FlexGrid for WinForms
ComboBoxEditor Property
Example 



Gets a ComboBoxEditor object that provides easy access to properties of the currently active ComboBox editor.
Syntax
'Declaration
 
<BrowsableAttribute(False)>
<C1CategoryAttribute("Behavior")>
Public ReadOnly Property ComboBoxEditor As ComboBoxEditor
'Usage
 
Dim instance As C1FlexGridBase
Dim value As ComboBoxEditor
 
value = instance.ComboBoxEditor
[Browsable(false)]
[C1Category("Behavior")]
public ComboBoxEditor ComboBoxEditor {get;}
[Browsable(false)]
[C1Category("Behavior")]
public:
property ComboBoxEditor^ 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 System.Windows.Forms.ComboBox, these properties return null or -1, and cannot be set.

Example
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);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback