Browse Source
Merge pull request #5787 from soosr/fix-datagrid-sorting-issue
Fix DataGrid selection after sorting
pull/5801/head
Steven Kirk
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
src/Avalonia.Controls.DataGrid/DataGrid.cs
|
|
|
@ -910,6 +910,11 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
// Clear all row selections
|
|
|
|
ClearRowSelection(resetAnchorSlot: true); |
|
|
|
|
|
|
|
if (DataConnection.CollectionView != null) |
|
|
|
{ |
|
|
|
DataConnection.CollectionView.MoveCurrentTo(null); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|