diff --git a/src/Avalonia.Controls.DataGrid/DataGridSelectedItemsCollection.cs b/src/Avalonia.Controls.DataGrid/DataGridSelectedItemsCollection.cs index eafee530c5..7a0dd24318 100644 --- a/src/Avalonia.Controls.DataGrid/DataGridSelectedItemsCollection.cs +++ b/src/Avalonia.Controls.DataGrid/DataGridSelectedItemsCollection.cs @@ -155,7 +155,7 @@ namespace Avalonia.Controls return; } - OwningGrid.SetRowSelection(itemIndex, false /*isSelected*/, false /*setAnchorSlot*/); + OwningGrid.SetRowSelection(OwningGrid.SlotFromRowIndex(itemIndex), false /*isSelected*/, false /*setAnchorSlot*/); } public void RemoveAt(int index)