PDA

View Full Version : GridPanel w/ PagiingToolbar's next-page loses selection(s)



cplist
6 Jan 2011, 7:24 AM
Hi, all. If you comment out disableSelection:true from the paging.js example, select 1 or more rows, then hit the next-page button, then hit the previous-page button, the selections are gone.

Oddly, it seems to preserve the selection(s) if you just hit the PagingToolbar's refresh button.

I have a similar but more complex setup that is demonstrating similar behavior. GridPanel + SelectionToobar + CheckboxSelectionModel. If I do a next-page or refresh on mine it preserves only one of the selections (the most recently selected) but not all of them. My idProperty's are unique from page to page, so I don't think they are getting clobbered.

TIA.

cplist
6 Jan 2011, 7:34 AM
Now my own refresh and next-page match the example. Refresh = selection remains intact. Next-page = selections gone.

cplist
6 Jan 2011, 8:22 AM
Well, after thinking about this further, I guess it makes sense for the selectionmodel to come up w/ nothing on a page change. The underlying store changes, so the selectionmodel doesn't have much choice other than to get confused. I am surprised that a refresh *does* maintain the selections. That doesn't seem consistent -- unless the before-refresh-store is being compared to the newly-refreshed-store for equivalence.