How to get form data while column filter in jqgrid
I have used external check box also using the updated answer code from Link
I have used the working example reference Link
jQuery("#list451").jqGrid({
url:'getList.php?mode=result_list',
datatype: "json",
height: 255,
width: 600,
colNames:['Index','Name', 'Code','Result'],
colModel:[
{name:'item_id',index:'item_id', width:65, sorttype:'integer',searchoptions:{sopt:['eq','ne','le','lt','gt','ge']}},
{name:'item',index:'item', width:150, sorttype:'string',searchoptions:{sopt:['eq','bw','bn','cn','nc','ew','en']}},
{name:'item_cd',index:'item_cd', width:100} ,
{name:'result',index:'result', width:100,sorttype:'string',searchoptions:{sopt:['eq','ne']} ],
rowNum:50,
rowTotal: 200,
rowList : [20,30,50],
loadonce:false,
mtype: "GET",
rownumbers: true,
rownumWidth: 40,
gridview: true,
pager: '#pager451',
sortname:'item_id',
viewrecords: true,
sortorder: "asc",
caption: "Loading data from server at once" });
jQuery("#list451").jqGrid('filterToolbar',{searchOperators : true});
External check box code Actions in script
//Pass fail code check box
$("#pass").change(function() {
var f = {groupOp:"AND",rules:[]};
if($("#pass").is(':checked')) {
f.rules.push({field:"result",op:"eq",data:"pass"});
}
grid[0].p.search = f.rules.length>0;
$.extend(grid[0].p.postData,{filters:JSON.stringify(f)});
grid.trigger("reloadGrid",[{page:1}]);
});
Check box html Code is below
<input type="checkbox" name="pass" id="pass">Pass
In above pass/fail code working for check box click to sort the pass/fail in grid.
I want if pass check box checked then i will enter item name in search box and choose the not equal search operation after enter to am not getting the pass check box value in server side. I got a search box value and search operators but i am not get the pass check box value.
I want pass check box value in server side.Please help me