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 combobox celltype to behave like a static celltype -> readonly and hide drop down option

Thread ID:





53853 Dec 21,2006 12:32 PM UTC Dec 21,2006 01:11 PM UTC WinForms 1
Tags: Grouping
James Blibo
Asked On December 21, 2006 12:32 PM UTC

I have a combobox celltype that i want to make to behave like a static cell. However, I do not want to make it disabled as that would prevent the cell from being clickable.

I have tried the code below to hide the drop down button..

this.gridGroupingControl1.TableDescriptor.Columns["ColumnName"].Appearance.AnyCell.ShowButtons = GridShowButtons.Hide;

I have set the readonly property but when the cell is click, the drop down list still appear.

how can i accomplish this?

Administrator [Syncfusion]
Replied On December 21, 2006 01:11 PM UTC

Hi James,

This can be achieved by handling the TableControlCellClick event. In the event, you can check for the comboBox celltype and cancel the cell click event. And you can hide the comboBox button The following is the code snippet

>>>>>>>>>>>>>Code Snippet<<<<<<<<<<<<<
//this.gridGroupingControl1.TableDescriptor.Columns[“ColumnName”].Appearance.AnyRecordFieldCell.CellType = "ComboBox"; //this.gridGroupingControl1.TableDescriptor.Columns[“ColumnName”].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide;
//this.gridGroupingControl1.TableControlCellClick += new GridTableControlCellClickEventHandler(gridGroupingControl1_TableControlCellClick);
void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
if (cc.Renderer.StyleInfo.CellType == GridCellTypeName.ComboBox)
e.Inner.Cancel = true;

Have a nice day.

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

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