How do I manipulate a jqGrid's search/filters?
Posted
by AaronSieb
on Stack Overflow
See other posts from Stack Overflow
or by AaronSieb
Published on 2010-04-08T22:26:35Z
Indexed on
2010/04/13
20:23 UTC
Read the original article
Hit count: 639
I have a jqGrid with a navBar that has search: true
and multipleSearch: true
. I would like to add a button to my UI that automatically adds an additional rule to the search.
I've tried manipulating the postData for the filter directly, but values added this way don't show up in the search UI.
I've also tried accessing the search box directly using jQuery, like this:
$('#fbox_list').searchFilter().add();
$('#fbox_list .sf .data input').each(function(index) {
alert($(this).val());
});
But, in addition to feeling hackish, it only works if the user has already clicked on the search button (the fbox_list div is not constructed on load).
Has anyone else dealt with an issue like this?
© Stack Overflow or respective owner