[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGridBase.ComboBoxEditor

ComboBoxEditor Property

ComboBoxEditor

Gets a ComboBoxEditor object that provides easy access to properties of the currently active ComboBox editor.

Declaration
[Browsable(false)]
public ComboBoxEditor ComboBoxEditor { get; }
Remarks

The ComboBoxEditor object can be used to get and set properties on the currently active ComboBox editor without casting the Editor property.

If no editor is active, or if the editor is not a ComboBox, these properties return null or -1, and cannot be set.

Examples

The code below shows two equivalent ways of accessing the selected index of the currently active ComboBox editor:

// with the ComboBoxEditor property:
Console.WriteLine("The current combo index is {0}",
    _flex.ComboBoxEditor.SelectedIndex);

// without the ComboBoxEditor property:
ComboBox cb = _flex.Editor as ComboBox;
int index = (cb != null) ? cb.SelectedIndex : -1;
Console.WriteLine("The current combo index is {0}",
    index);