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

ggc combobox - setting selected item

Thread ID:





59951 Apr 25,2007 09:49 AM UTC Apr 25,2007 05:24 PM UTC WinForms 1
Tags: GridControl
Ryan Hardoon
Asked On April 25, 2007 09:49 AM UTC


I managed to define a ggc combobox column using the following code

StringCollection rows = new StringCollection();
ggc1.TableDescriptor.Columns["Col1"].Appearance.AnyRecordFieldCell.CellType = "ComboBox";
ggc1.TableDescriptor.Columns["Col1"].Appearance.AnyRecordFieldCell.DataSource = rows;

I now need to select an item programatically, but I couldn't find any property that relates to the Selected-Index and everything I tried has failed.

(my product version is

Thanks in advance.

Rajagopal [Syncfusion]
Replied On April 25, 2007 05:24 PM UTC

Hi Ryan,

The grid does not track ''the selected index''. The only thing its knows is the cell value. The selected index is only around when the dropdown is visible.
You can use the code below in the TableControlCurrentCellCloseDropDown/TableControlCurrentCellShowedDropDown to get at the selected index.

void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
GridComboBoxCellRenderer cr = cc.Renderer as GridComboBoxCellRenderer;
if (cr != null)

But when there is no combobox dropped or about to be dropped or closed, then there is no selectedindex available.

Let us know if you need any further information.


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