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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selected index change event for combo box

Thread ID:

Created:

Updated:

Platform:

Replies:

64514 Jul 22,2007 01:43 PM UTC Jul 23,2007 03:18 PM UTC WinForms 1
loading
Tags: GridControl
Raj
Asked On July 22, 2007 01:43 PM UTC

I am using the Combobox in the grid. When ever the selected index is changed i need to hide or unhide the rows. I have 2 issues here
1) I am not able to find the selected index changed event for the combobox
2) How can i get the index of the selected item in the combo box
Please provide pointers to resolve this issue

Thanks in Advance
Raj

haneefm [Syncfusion]
Replied On July 23, 2007 03:18 PM UTC

Hi Raj,

Generally you would use the CurrentCellChanged event to catch when the selected index of a combobox changed. But if you want to get at the SelectedIndexChanged event you can. Note that there is only one combobox and it is shared among all cells that have a ComboBox CellType so you will need to take this into consideration as you catch this event. You catch add code like this in Form.Load to subscribe to the event for all cells.

GridComboBoxCellRenderer cc = this.grid.CellRenderers["ComboBox"] as GridComboBoxCellRenderer;
cc.ListBoxPart.SelectedIndexChanged += new EventHandler(combo_SelectIndexChanged);

To get the new displaymember, try

cc.Renderer.ControlText

To get the new ValueMember, try

cc.Renderer.ControlValue

Best regards,
Haneef

CONFIRMATION

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.

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

;