-
6 Feb 2012 5:23 AM #1
Filter in paging grids
Filter in paging grids
In a paging grid, when filters are added the result is a useless grid: it shows as many pages as initially but all of them are empty but those that have a row that matches the pattern. This is useless from the usability point of view.
What I think it should do is group all rows that match the pattern of the filter an then paginate those rows.
In fact, I think the right way to implement this is by adding the filtering information in the loading system just as you do with the sorting. This way the server-side could do the filtering so the client did not have to do that effort.
It is to say, add a field in a class that extends from ListLoadConfig that has the filtering information, just as you have for the 2.x version (FilterPagingLoadConfig)
-
16 Feb 2012 11:57 AM #2
How did you get a paging grid working with filtering? When I bind the loader on my paging tool bar it complains about the signature.
Here's what I have:
The error is:Code:RpcProxy<FilterPagingLoadConfig, PagingLoadResult<M>> proxy = new RpcProxy<FilterPagingLoadConfig, PagingLoadResult<M>>() { @Override public void load(FilterPagingLoadConfig loadConfig, AsyncCallback<PagingLoadResult<M>> callback) { proxyCallback.execute(loadConfig, callback); // my own invocation... } }; final PagingLoader<FilterPagingLoadConfig, PagingLoadResult<M>> loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<M>>(proxy); loader.setRemoteSort(true); loader.addLoadHandler(new LoadResultListStoreBinding<FilterPagingLoadConfig, M, PagingLoadResult<M>>(this.listStore)); PagingToolBar pagingToolBar = new PagingToolBar(20); pagingToolBar.getElement().getStyle().setProperty("borderBottom", "none"); pagingToolBar.bind(loader); // compiler error
bind(PagingLoadConfig) cannot be applied to bind(FilterPagingLoadConfig). A cast did not fix the issue - probably because a FilterPagingLoadConfig is a PagingLoadConfig.
Thanks,
--adam
-
16 Feb 2012 1:50 PM #3
icfantv: The generics issue should be better in beta3 - give that a try, see if that helps.
paucarre: can you post a simple entrypoint that is wiring up the paging/filtering and drawing blank pages - the example at http://sencha.com/examples-dev/#Exam...motefiltergrid seems to be doing this, though there are only two pages, filtering a column reduces it to one column. An example you can offer demonstrating this issue would be helpful for us.
-
16 Feb 2012 2:09 PM #4
Colin-
Beta3 fixed this. Thanks.
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote