I am using jqGrid with a search toolbar. Now for several columns I do not need the search field, because I do not want to make them searchable (i.e. a column of checkboxes). For these columns I want to hide the search field in the search toolbar.
I have read in the jqGrid documentation that the viewable option can be set to false.
Here is the part where I set the viewable option:
colModel :[
{name:'checkbox', index:'checkbox', width:'3%', viewable:false},
Here is how I create the search toolbar:
jQuery(function(){
jQuery("#listTable").jqGrid('filterToolbar',{stringResult: true, searchOnEnter: false});
});
According to the documentation, the viewable option is valid only if the viewGridRow method is activated.
But when I use (activate) the viewGridRow method, that creates another dialog. In that dialog the column whose viewable is set to false does not appear. But I want to hide the search field in the search toolbar not in a new dialog. How can I do that?
I have also tried to get the corresponding div (the one that surrounds my search field) and set its style.display to none. But that does not help.
Is there a way I could hide this search field in the search toolbar?