javascript - Is it possible to dynamically close or open a Jqgrid column search? -
is possible open , close search function of columns after loading jgrid?
the underlying code allows hide search part, not affect search function
it works fine hide haven't found need show it
this code not affect search function
i have influence search
$("#gs_name").closest(".ui-search-table").hide();
update
the desired combination in client name column
search = hidden -> search = false
search = show -> search = true
$("#columnhide").click(function(){ $("#gs_name").val("") $("#gs_name").closest(".ui-search-table").toggle(); });
the hidden property in double click property of colmodel. in case should use jquery selector :hidden job.
the code can changed this:
ondblclickrow: function(rowid, irow, icol, e) { var cm = $(this).jqgrid("getgridparam", "colmodel"); var cmvalues = $(this).jqgrid("getrowdata", rowid); $.each(cm, function(i,n){ if(!n.hidden) { var elem = $('#gs_'+n.name); if( elem.is(":hidden") { // set empty overcome search when trigger elem.val(""); } else { elem.val( cmvalues[n.name]); } } }); this.triggertoolbar(); },
wiki
Comments
Post a Comment