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.
Unfortunately, activation email could not send to your email. Please try again.

Change alternating rows color

Thread ID:





116839 Jun 16,2014 01:45 PM Jun 30,2014 12:39 AM Windows Forms 3
Tags: GridControl
I Mesta
Asked On June 16, 2014 01:45 PM

How I can change the back color in the rows?  
I mean exist the posibility of change the color in alternating rows property like in DataGridView AlternatingRowsDefaultCellStyle property
I wanna change the color.

Muthukumar Kalyanasundaram [Syncfusion]
Replied On June 20, 2014 11:53 PM

Hi Mesta,

Thanks for your interest in Syncfusion Products.

If you want to change the background color , you can use BackColor property. You can change the backcolor for alternate rows by QueryCellInfo event. Please refer the below code.

 Code Snippet[C#] :

this.gridControl1.QueryCellInfo += new Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventHandler(gridControl1_QueryCellInfo);

void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)


            if (e.RowIndex % 2 == 0 && e.RowIndex!=0)

                e.Style.BackColor = Color.Red;


Please let us know if you have any concern.


Muthukumar K

I Mesta
Replied On June 25, 2014 12:08 PM

Thanks for all =)

Muthukumar Kalyanasundaram [Syncfusion]
Replied On June 30, 2014 12:39 AM

Hi Mesta,

Thank you for the update.
We are glad to hear that your issue has been resolved. Please let us know if you require any further assistance in future.

Muthukumar K


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.