I am new in jQgrid coding. I have implemented Toolbar searching in my jQGrid. In that I want to add clear search button or you can say RESET button next to search textbox like this
How I achieve this??? I search a lot about this on internet but I didn't found something relevant to achieve this. I am using jQgrid 4.4.4 & jQuery 1.8.3.
You should update jqGrid to the last version 4.5.4. It has implemented the feature which you need. New property clearSearch: false
in colModel
can be used to remove clear search button in some columns.
try this
$('#delete-button').click(function(){
$('#input-field').val("");
});
Here is an example DEMO
//clear all the text boxes in jqgrid
$('input[id^="gs_"]').val('')
//To reload data result (with no filters) - reload jqgrid as below
$("#jggridId")
.jqGrid('setGridParam', { search: false, postData: { "filters": "" }})
.trigger("reloadGrid");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.