This my jqGrid search toolbar script:
<link rel="stylesheet" type="text/css" media="screen" href="jqGrid/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jqGrid/plugins/ui.multiselect.css" />
<script src="jqGrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="jqGrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="jqGrid/js/jquery.jqGrid.src.js" type="text/javascript"></script>
<script src="jqGrid/src/jquery.fmatter.js" type="text/javascript"></script>
<script src="jqGrid/src/jqModal.js" type="text/javascript"></script>
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},
{name:'Line', index:'Line', width:80, align:'right', editable:true,search:true,stype:'text',searchoptions:{sopt:['cn']}}],
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,search:false});
jQuery("#list").jqGrid('filterToolbar', { stringResult: true, searchOnEnter: true, groupOp:'AND'});
And in console:
_search:true
nd:1306513344121
rows:10
page:1
sidx:Problem_date
sord:desc
filters:{"groupOp":"AND","rules":[{"field":"Line","op":"cn","data":"7"}]}
how should I do to post the “data” value? so, I can search data use toolbar search.

You should just use
defaultSearch:'cn'option of the filterToolbar method:(I removed additionally the options with the default values).
If you use local grid data or the option
loadonce:trueanother jqGrid parameter ignoreCase:true could be also interesting for you.UPDATED: If you want to use different searching operations for the different columns you should use correct
colModeloptions:searchoptionsinstead ofsearchoption(‘s’ character at the end).UPDATED 2: How you can verify here if you type
blain the searching toolbar in the ‘Line’ column the request with the datawill be send to the server which will be decoded as
So the operation which will be used is “cn”.
UPDATED 3: If you use
datatype: 'json'withoutloadonce:true, the server is responsible for sorting, paging and filtering of the data. The jqGrid just send the corresponding information in the parameters (rows,page,sidx,sord,_search:true,filters). If you don’t can or don’t want to do all this on the server side you can just useloadonce:trueand the client part (jqGrid yourself) will changedatatypeto ‘local’ after the first load and will do all what you need itself. It work very good if the size of you data small (about 100 rows). You can try this way.