Again with Multiple search we can use another useful option grouping search
If this option is enabled the user can make a more complex searches in the database:
The query can can look like this :
WHERE (id > 10 OR id < 13) AND name LIKE 'C%'
HTML
Java Scrpt code
jQuery("#grps").jqGrid({
url:'server.php?q=4',
datatype: "json",
colNames:['Inv No', 'Date', 'Client', 'Amount','Tax','Total','Notes'],
colModel:[
{name:'id', key : true, index:'id', width:55},
{name:'invdate',index:'invdate', width:90},
{name:'name', index:'name', width:100},
{name:'amount',index:'amount', width:80, align:"right"},
{name:'tax',index:'tax', width:80, align:"right"},
{name:'total',index:'total', width:80,align:"right"},
{name:'note',index:'note', width:150, sortable:false}
],
rowNum:10,
width:700,
rowList:[10,20,30],
pager: '#pgrps',
sortname: 'invdate',
viewrecords: true,
sortorder: "desc",
jsonReader: {
repeatitems : false
},
caption: "Complex search",
height: '100%'
});
jQuery("#grps").jqGrid('navGrid','#pgrps',
{edit:false,add:false,del:false},
{},
{},
{},
{multipleSearch:true, multipleGroup:true}
);