View Full Version : need selection model across pages for paged tables

28 Jul 2008, 4:53 AM

we need a selection model that remembers selections on all pages of a paged table. So selecting a row on page 1, then switch to page 2 (select a row there) and switching back to page 1 should show the selection and the selection model should return both selected rows in the getSelectedItems method.

I know, this is kind of hard, as the items are recreated when paging from page 1 to page 2 and back...

Is there any chance for this functionality (in the grid)?


2 Aug 2008, 5:59 AM
You will have to manage selections when using paging. Your best bet will be to keep track of selections for all of your data. Depending on your use case, you could save the selection state on the model itself. Anytime the selection changes you need to update your state. Then whenever the data is paged, you can apply the state to the current data.