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.

alternate item color in GridControl and GridDataBoundGrid

Thread ID:





43511 Apr 25,2006 03:49 AM Apr 25,2006 05:11 AM Windows Forms 2
Tags: GridControl
Fady Sayegh
Asked On April 25, 2006 03:49 AM

hi to all, how can i alternate automatically item color in GridControl and GridDataBoundGrid best regards and thanks in advance fady

Administrator [Syncfusion]
Replied On April 25, 2006 04:50 AM

Hi Fady, You need to handle the Grid''s PrepareviewstyleInfo event for coloring the row in a grid.Here is a code snippet. if(e.RowIndex > 0 && e.ColIndex > 0) { if(e.RowIndex %2 == 0) { e.Style.BackColor = Color.PaleGreen; } else { e.Style.BackColor = Color.BurlyWood; } } Please let me know if you need any further assistance. Thank you for choosing Syncfusion Essential Studio. Regards, Haneef

Fady Sayegh
Replied On April 25, 2006 05:11 AM

Hi Haneef, thanks to your reply, it works fady


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.