I am using jqgrid version 4.4.4 and right now I am facing one problem related to toolbar searching. As I mention in heading, I want remove search box of toolbar search from any column "dynamically" during or after rendering a grid. I google it but I didn't found any relevant solution on my this problem.
I used selColProp
property like this
$('#<gridId>').jqGrid('setColProp', 'LotNo', {
search: false
});
and mentioned in loadcomplete
function due to some logical reason.
If anyone knows how to do this, kindly share your valuable ideas.
UPDATED: Now I am using free jqgrid version 4.9.2 and this functionality also not happening on it.
Searching toolbar will be created once. It includes all searchable columns in the searching toolbar. If you need to change the
search
property dynamically then you have to recreate the searching toolbar after changing the value ofsearch
property. You need just calldestroyFilterToolbar
to remove the searching toolbar and then callfilterToolbar
once more time.Alternatively you can consider just to hide the searching field after setting the
search
property tofalse
. The corresponding code could be something likeThe string
gs_LotNo
is the id of the input field of theLotNo
column. and using$("#gs_LotNo").closest(".ui-search-table")
you get the outer table which contains optional searching menu andx
button. You can consider to make the content of the field empty ($("#gs_LotNo").val("")
) before hiding to be sure that the current value in the input field will not be used in filters.