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

Change cell background colour when GridListControl value changes.

Thread ID:





117337 Sep 30,2014 12:39 PM UTC Oct 2,2014 06:54 PM UTC WinForms 1
Tags: GridDataBoundGrid(Classic)
Martin Fenech
Asked On September 30, 2014 12:39 PM UTC

I have a column which is of cell type "GridListControl" in a GridDataboundGrid. I would like to be able to change the background of the cell when the value of the GridListControl changes as soon as the dropdown closes rather than when the cell being eidted loses focus. Is this possible?


Maniratheenam Sehar [Syncfusion]
Replied On October 2, 2014 06:54 PM UTC

Hi Martin Fenech,

Thank you for using Syncfusion products.

We would like to let you know that we can use the CurrentCell property to get the rowIndex and columnIndex of the current cell. Having the rowIndex and columnIndex we can set the backcolor of the selected cell. For changing the back colour of the combobox we suggest you to use the CurrentCellShowingDropDown event. Please refer the below code snippet.


this.grid1.Click+=new EventHandler(grid1_Click);

void grid1_Click(object sender, EventArgs e)


GridCurrentCell cc = this.grid1.CurrentCell;

grid1[cc.RowIndex, cc.ColIndex].BackColor = Color.Black;


this.grid1.CurrentCellShowingDropDown+=new GridCurrentCellShowingDropDownEventHandler(grid1_CurrentCellShowingDropDown);

void grid1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs arg)


GridCurrentCell cc = this.grid1.CurrentCell;

GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;

cr.ListBoxPart.BackColor = Color.Blue;

cr.ListBoxPart.ForeColor = Color.Cyan;


Please let us know if you need any further assistance


ManiRatheenam S



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

or the page will be automatically redirected to 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