This question is locked. New answers and comments are not allowed.
I'm using a RadDataGrid, and need to find out what rows are currently visible. Does RadDataGrid have an equivalent to "FirstDisplayedScrollingRowIndex" or "VisualRows" or similar?
First, here is some background.
So we have a RadDataGrid that is displaying a list of items. The item information is being updated on the fly and we need the RadDataGrid to update itself to reflect those changes. Another developer also working on the project said from what he could find we would need to set the grid's items to null, and then set them to our updated list in order to get the RadDataGrid to update itself. Like this:
// reset the source of the DataGrid so the DataGrid UI will update itself
this.DataGrid.ItemsSource = null;
this.DataGrid.ItemsSource = ourListOfItems;
Is there a better way to do that?
So because we nulling the ItemsSource and adding a new set of items (which are really just the exact same set of items, they've just been updated), the scrollbars have a problem. If you are scrolled down in the RadDataGrid, when the ItemsSource is reset, the scrollbars also reset, sending you up to the top. So, how can I make it so the scrollbars will go back to the position they were already in? Seemed like one way was to find the currently visible rows before resetting the ItemsSource. So how can I do that?
First, here is some background.
So we have a RadDataGrid that is displaying a list of items. The item information is being updated on the fly and we need the RadDataGrid to update itself to reflect those changes. Another developer also working on the project said from what he could find we would need to set the grid's items to null, and then set them to our updated list in order to get the RadDataGrid to update itself. Like this:
// reset the source of the DataGrid so the DataGrid UI will update itself
this.DataGrid.ItemsSource = null;
this.DataGrid.ItemsSource = ourListOfItems;
Is there a better way to do that?
So because we nulling the ItemsSource and adding a new set of items (which are really just the exact same set of items, they've just been updated), the scrollbars have a problem. If you are scrolled down in the RadDataGrid, when the ItemsSource is reset, the scrollbars also reset, sending you up to the top. So, how can I make it so the scrollbars will go back to the position they were already in? Seemed like one way was to find the currently visible rows before resetting the ItemsSource. So how can I do that?