views:

313

answers:

1

Is there a way to filter the data currently displayed in a jqGrid programmatically (in Javascript, not server-side)? All the search examples seem to depend on using jqGrid's own search UI, which doesn't work for me. For example, I'd like to be able to filter based on user actions elsewhere on a page.

I'm imagining something like

jQuery("#grid_id").filter('CategoryID', selectedCategoryID);

where CategoryID is a column in the grid and selectedCategoryID contains, for example, a value chosen by the user in a select element.

A: 

You could pass JSON as the data and use the setGridParam method to reload the data!

I have never tried this and not sure how you would get jqgrid to use your client data rather than hit a URL!

Have you had any luck?

Rigobert Song