我在我的项目中使用Jqgrid。为了验证目的,我已经在每列上定义了自定义函数。像,jqgrid自定义函数访问其他字段值
{ label: 'Name', name: 'Name', width: 300,
editable:true, edittype:"custom", sortable:false,
editoptions:{custom_element: getDatabaseColumnSelector,
custom_value:getSelectedDatabaseColumn},
editrules:{required:true, custom:true, custom_func:somefunction}
},
在这里,我要用于验证目的somefunction(),在这个功能我用其他的列值也进行验证。有些东西就像
if employeecountry = "US" then name.length < 10
但是在这个函数中,我怎么能得到名称列的自定义函数中employeecountry的值。我试着用
"# + rowId + _columnname"
但这不工作的情况下与附加的形式,因为ROWID没有设置在那个时候。如何在另一列中定义的自定义函数中获得其他列值,这些列值将以编辑表单,内联编辑和添加表单的方式工作。任何帮助都将非常可观。