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

Changing color of entire row in Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl

Hi,

How can I change background color of an entire row in the GridListControl, instead of changing color for each column.

The dataset which I'm binding to Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl has 45 columns and 10,000 rows to display. So, changing the background for each cell takes more time. So, I'm looking for an option of changing based on selected row.

Please respond ASAP. Thanks in advance.

Thanks,
Anil Teja

1 Reply

JJ Jisha Joy Syncfusion Team June 29, 2010 10:20 AM UTC

Hi Anil,

Thank you for using Syncfusion products.

You could use the following code to change the backcolor of the currently selected row.

this.gridGroupingControl1.TableControlPrepareViewStyleInfo += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventHandler(gridGroupingControl1_TableControlPrepareViewStyleInfo);

void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlPrepareViewStyleInfoEventArgs e)
{
if (e.Inner.RowIndex == this.gridGroupingControl1.TableControl.CurrentCell.RowIndex)
e.Inner.Style.BackColor = Color.BlanchedAlmond;
}

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon