PDA

View Full Version : GridPanel Filter Preservation after Reload



ecerrillos
Aug 29, 2010, 3:59 AM
Hi,

I searched the forums extensively before asking this question, so if it's already been addressed, please direct me to that page.

Basically, I have a GridPanel which I'm refreshing every X seconds. After the refresh I want to preserve the entire grid's state (from columns to filters).
Now, I found out the way to deal with the grid's state regarding columns, sorting etc. However, the filtering is only preserved on initial load. After I do either a DataStore.reload() or GridPanel.reload(), the filtering state goes away (even though the column still shows as filtered).

I know it must be something very simple but I tried many things, including trying to set the DataStore.filterBy(GridPanel.getFilterPlugin().get RecordFilter()); to no avail.

Any and all help will be greatly appreciated.



Thanks,
Eben

ecerrillos
Aug 29, 2010, 8:27 PM
I don't know if there is an easier way but I just ended up hooking up to the "Load" Store listener and called the following:
DataStore.filterBy(GridPanel.getFilterPlugin().get RecordFilter());


If I'm doing too much work or if there is an easier way, feedback is still welcomed!



Thanks,
Eben