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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

set cell background color

Thread ID:





51933 Nov 16,2006 06:50 PM UTC Nov 17,2006 04:39 AM UTC WinForms 1
Tags: GridControl
Asked On November 16, 2006 06:50 PM UTC


I'm trying to figure out if you are able to change the background of a cell when the value of a different cell changes.
For example, within the same row, if the value of the first cell changes, I want to set the background of another cell down the row to another color.

Any help would be appreciated.


Administrator [Syncfusion]
Replied On November 17, 2006 04:39 AM UTC

Hi Linda,

Are you using GridDataBoundGrid? If so, please refer the below forum thread which discuss with simillar issue.

For GridControl, you can handle the CurrentCellChanging event and set the backcolor property of the cell using grid's indexer. Here is a code snippet to show this.

//Column 1 changes affect the Column 3
private void GridCellChanging(Object sender, CancelEventArgs e)
GridControl grid = sender as GridControl;
GridCurrentCell cc = grid.CurrentCell;
if( cc.ColIndex == 1)
grid[cc.RowIndex, 3].BackColor = Color.Blue;

Best Regards,


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