I have added the bp:GridViewRowSelectColumn to a bp:GridView that uses a DataPager. In my testing I noticed that when selecting a row on a page and then going to a different page, the same row was selected on every other page that gets activated.
For example, if I select the 2nd row on page 1 and then go to page 4, the second row will be selected on page 4.
The SelectedRows
property in the view model then would contain a record for the 2nd row on each page that was visited. (So in this example, there would be 2 values, one from page 1 and one from page 4.)
This seems incorrect. As a user, I would only expect those items that I explicitly checked to be added to the list of selected items. (The 2nd row from page 1 only.)
I tried to create a workaround but was not able to. I could not find a way to simply reset the SelectedRows value when the page changes. Is there an event that we can listen for/attach to when the DataPager page changes?