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

Backgroundcolor of rows

Thread ID:





5664 Jul 13,2003 01:03 PM UTC Jul 13,2003 02:30 PM UTC WinForms 1
Tags: GridControl
Oliver Nagel
Asked On July 13, 2003 01:03 PM UTC

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 02:30 PM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon