I am using the following code for a wpf DataGrid
:
How can I paginate a WPF DataGrid?
The paging works fine except that when i move to any page besides the first one and try to pick (press) any row/cell i am getting the following exception :
Specified argument was out of the range of valid values. Parameter name: position
BTW - i needed to change the declare of PagingCollectionView _cview to be not readonly.
<DataGrid ItemsSource="{Binding}" Grid.Row="1" x:Name="rightGrid" x:Uid="rightGrid" SelectionChanged="rightGrid_SelectionChanged">
...
And
private void rightGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
}