I'm using RadGridView to display a changing data set with Data Virtualization and UI Row Virtualization. I have a RowStyleSelector that sets various visual properties for the rows depending on the data. Selection Mode is Extended. When new data arrives from the server, I call VirtualQueryableCollectionView.Load to load the updated items into the grid.
This all seems to work. However, I'm having problems getting selection to work properly when I update the data. My objects have a unique ID and I keep track of the selected IDs in the ViewModel. When new data is loaded into the grid, I am trying to handle the RowLoaded event and check if the ID of the data is in my SelectedIDs list; if so, I set row.IsSelected=True, otherwise False.
The problem I am seeing is that I only get a RowLoaded event for every other row! So when new data arrives, my selection is only preserved on every other row and the others become deselected visually. I tried removing my RowStyleSelector but it still happens, so it's not related to that.
Is this a bug or am I doing something wrong? I was having this problem in 2011Q3 and just upgraded to 2012Q1 and still have the same issue.
Thanks,
Joseph
This all seems to work. However, I'm having problems getting selection to work properly when I update the data. My objects have a unique ID and I keep track of the selected IDs in the ViewModel. When new data is loaded into the grid, I am trying to handle the RowLoaded event and check if the ID of the data is in my SelectedIDs list; if so, I set row.IsSelected=True, otherwise False.
The problem I am seeing is that I only get a RowLoaded event for every other row! So when new data arrives, my selection is only preserved on every other row and the others become deselected visually. I tried removing my RowStyleSelector but it still happens, so it's not related to that.
Is this a bug or am I doing something wrong? I was having this problem in 2011Q3 and just upgraded to 2012Q1 and still have the same issue.
Thanks,
Joseph