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.

Backgroundcolor of rows

Thread ID:





5664 Jul 13,2003 09:03 AM Jul 13,2003 10:30 AM Windows Forms 1
Tags: GridControl
Oliver Nagel
Asked On July 13, 2003 09:03 AM

Hi! Is there a way to change the Background Color of a specific row in a GridDataBoundGrid? regards oliver

Administrator [Syncfusion]
Replied On July 13, 2003 10:30 AM

Handle the PrepareViewStyleInfo event and set the backcolor there if the e.RowIndex and e.ColIndex point to a cell in the row.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
        //color row 2
	if(e.ColIndex > 0 && e.RowIndex == 2)
		e.Style.BackColor = Color.Red;


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.