diff --git a/Xamarin.Forms.DataGrid/DataGridViewCell.cs b/Xamarin.Forms.DataGrid/DataGridViewCell.cs index 0c0f68c..c025607 100644 --- a/Xamarin.Forms.DataGrid/DataGridViewCell.cs +++ b/Xamarin.Forms.DataGrid/DataGridViewCell.cs @@ -106,7 +106,7 @@ private void UpdateBackgroundColor() if (actualIndex > -1) { _bgColor = (DataGrid.SelectionEnabled && DataGrid.SelectedItem != null && DataGrid.SelectedItem == RowContext) ? - DataGrid.ActiveRowColor : DataGrid.RowsBackgroundColorPalette.GetColor(Index, BindingContext); + DataGrid.ActiveRowColor : DataGrid.RowsBackgroundColorPalette.GetColor(actualIndex, BindingContext); _textColor = DataGrid.RowsTextColorPalette.GetColor(actualIndex, BindingContext); ChangeColor(_bgColor);