开发者

jqGrid search not working

I'm new to jqgrid and I don't know how jqgrid work. I have an search icon in my grid but it doesn't work when I want to filter some data. Below I've post my grid:

jQuery("#list").jqGrid({
                         url:'dounfinish.php',
                         datatype: 'json',
                         mtype: 'POST',
                         colNames:['id','Date', 'Line'],
                         colModel :[ 
                                    {name:'def_id',index:'def_id', hidden:true, width:55}, 
                                    {name:'Problem_date', index:'Problem_date', width:90, editable:true}, 
                                开发者_StackOverflow社区    {name:'Line', index:'Line', width:80, align:'right', editable:true, search:true},
                                    ],
                         pager: jQuery('#pager'),
                         rowNum:10,
                         rowList:[10,20,30],
                         sortname: 'Problem_date',
                         sortorder: "desc",
                         viewrecords: true,
                         imgpath: 'themes/basic/images',
                         caption: 'OQC DEFECT DATA'
                         }); 
jQuery("#list").jqGrid('navGrid','#pager',{edit:true,add:false,del:false});

what should i change to make search process work?


have you tried looking at the search wiki? it looks like your column definition should look something like this:

colModel: [ 
      ... 
      {name:'price', index:'price', width:60, search:true, stype:'text', searchoptions:{dataInit:datePick, attr:{title:'Select Date'}} },
      ...
   ]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜