We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Background color of selected rows with multiple selection

Hi,

I would like to have the different rows selected in a grid with different colors...The selection color will match the color of a line in a chart. I was able to change the background color using the GridSelectionBackgroundColor of a DataGridStyle.. but this as the effect that all selected rows change color not just one row

I tried something somilar to this:

int currentColorIndex = 0;
void DataGrid_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
{
      for (int i = 0; i < e.AddedItems.Count; i++)
      {
                gridStyle.GridSelectionBackgroundColor = colorForSelection(currentColorIndex );
                currentColorIndex ++;
      }
}

Just in case it could have some impact we are using dynamic column



1 Reply

DD Dharmendar Dhanasekar Syncfusion Team January 14, 2016 12:46 PM UTC

Hi Yves Tessier,

Thank you for using syncfusion  product.

We have analyzed your query. At present, there is no support for applying different selection colors for the selected rows. Customizing the selection color will apply the selection colors for all rows and cannot make work around for this.

Please let us know if you have any query.

Regards,
Dharmendar


Loader.
Up arrow icon