谁能建议我如何在子网格的自定义验证功能中获取父行 ID?
这是我的代码
subGrid: true,
subGridRowExpanded: function (subgrid_id, row_id)
{
var subgrid_table_id;
subgrid_table_id = subgrid_id+"_t";
var subgrid_pager_id = subgrid_id+"_p";
jQuery("#"+subgrid_id).html("<table id="+subgrid_table_id+" class=scroll></table><div id="+subgrid_pager_id+" ></div>");
jQuery("#"+subgrid_table_id).jqGrid(
{
url:"form_subgrid_ajax_296.php?id="+row_id+"&child_form_id=296",
editurl:"../ajax/common_subgrid_edit_296.php?form_id="+sub_grid_id+"&parent_id="+row_id,
datatype: "json",
colNames: ['ID','PESO'],
colModel: [{name:'id',index:'id',editable:false,hidden:true},
{name:'peso',
index:'peso',
formoptions:{elmsuffix:''},editrules:{required:true,custom:true, custom_func:customNumberChk},editable:true,
hidden:false,
search:true,
editoptions: {size:80, maxlength: 1000}
}],
sortorder: "asc",
height: 300,
loadonce: false,
width: 500,
rowNum:10,
rowList:[10,20,50],
sortname: 'id',
sortorder: "asc",
cellEdit: false,
cellsubmit: "clientarray",
caption:"Child",
pager: subgrid_pager_id
});
jQuery("#"+subgrid_table_id).jqGrid
(
"navGrid",
"#"+subgrid_pager_id,
{
edit:true,
add:true,
del:true,
search:false
},
{
width:780,
recreateForm:true
},
{
width:780,
recreateForm:true
}
);
}
现在看名称:'peso',index:'peso', .我使用了自定义函数customNumberChk。
这是我的自定义功能
function customNumberChk(value,colname)
{
}
我想要这个函数中的rowid。