开发者

remote filtering

i have added filter to each of the columns in a grid panel. When i try to query an item it filters the items based on the page displayed rather than the total number of records becuase i enabled paging.

Can you please help me by giving the basic idea as how to d开发者_开发百科o remote filtering with paging grid.what are the parameters that are needed to send to server side in order to do remote filtering

Thanks.


When the filter is executed you'll need to re-execute your remote query and repopulate the grid's store. There's really no getting around that. The simple approach would be to simply execute the query and reload the grid from scratch to page 1 (with the default params). You could also get fancy and try to preserve the current page, but that will get tricky since values on the current page may have gotten filtered out of the view, so you'll have to programmatically determine how to "shift" your paging to stay on page X with a full page of data. Also, page X may no longer even exist if the filter results in fewer pages than X.

In my opinion, when filtering remotely it's usually not worth it to try and preserve the current paging state, but it's up to you and your requirements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜