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

disable combobox embedded in cell

Thread ID:





69009 Oct 9,2007 07:07 PM UTC Oct 10,2007 03:51 PM UTC WinForms 1
Tags: GridControl
Ashes Mukherjee
Asked On October 9, 2007 07:07 PM UTC

I have a GridDataBoundGrid where certain columns hold combobox controls. On checking/unchecking of a checkbox cell (on the same row), I would like to enable/disable this combobox control.

haneefm [Syncfusion]
Replied On October 10, 2007 03:51 PM UTC

Hi Ashes,

Below are the codes which demonstrates a way to change the appearance of the combobox cell in grid. For this, you can handle the PrepareViewStyleInfo event and set the Enabled and Clickable property to checkbox's cellvalue.

void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
GridDataBoundGrid _grid = sender as GridDataBoundGrid;
int _targetColIndex = _grid.NameToColIndex("Col2");

if (e.RowIndex > 0 && e.ColIndex == _targetColIndex)
int _checkColIndex = _grid.NameToColIndex("CheckBox");
bool _checkBoxValue = Convert.ToBoolean(_grid.Model[e.RowIndex, _checkColIndex].CellValue);
e.Style.Enabled = _checkBoxValue;
e.Style.Clickable = _checkBoxValue;
private void gridDataBoundGrid1_CurrentCellChanged(object sender, System.EventArgs e)
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if(cc.Renderer.StyleInfo.CellType == "CheckBox")

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