I started a new project recently and am trying out the latest version of JqGrid(4.4.0). I am also using jquery 1.7.2 and jquery ui 1.8.21 with the eggplant theme.
Anyway, I have everything in my grid working except the search functionality. On my other project when setting search: true on my colModel options it would create a textbox under the column name where I could put a search input, but I can’t seem to get it to work for this grid. My search input box just doesn’t appear at all. It’s as if it thinks search is false for the column or something.
Here’s my javascript:
$("#mylist").jqGrid({
url: 'myposturl',
datatype: 'json',
mtype: 'POST',
colNames: ['Id', 'Code'],
colModel: [
{ name: 'Id', hidden: true },
{ name: 'Code', align: 'center', search: true }
],
pager: '#mylistpager',
rowNum: 30,
rowList: [10, 20, 30],
sortname: 'Code',
sortorder: 'desc',
viewrecords: true,
gridview: true,
caption: 'List Rows',
width: 750,
height: 750,
jsonReader: {
total: 'TotalPages',
page: 'CurrentPage',
records: 'TotalRecords',
root: 'Rows',
repeatitems: false
}
});
Any ideas?
EDIT: I missed this part:
$(“#mylist”).filterToolbar({ autoSearch: true });
Whoops, I completely forgot about this part. 🙂