Class MultiColumnComboBox
Represents a combo box that can show multiple columns in the dropdown.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class MultiColumnComboBox : ComboBoxBaseDataBound, IThemedControl, ISupportInitialize, INonClientPaintingSupport, ISupportOffice2007Theme, IThemeProvider, IVisualStyle
Remarks
This combo box is meant to be used in data bound mode where it will show all the records and the different fields in the data source in a multi column grid, in the dropdown.
Data binding is done as usual through the DataSource, DisplayMember and ValueMember properties. The DisplayMember is used to determine which field will be shown in the combo.
If you bind an array of objects of custom type then the public properties in that type will correspond to each column in the dropdown multi-column grid.
Note that in this version you cannot populate the Items of this combo manually.
Constructors
MultiColumnComboBox()
Initializes a new instance of the MultiColumnComboBox class.
Declaration
public MultiColumnComboBox()
Properties
AllowFiltering
Declaration
public bool AllowFiltering { get; set; }
Property Value
Type |
---|
System.Boolean |
AlphaBlendSelectionColor
Gets or sets the System.Drawing.Color for alpha blended row selections in the dropdown.
Declaration
public Color AlphaBlendSelectionColor { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color | A System.Drawing.Color for alpha blended row selections. It is important to set the alpha value to be less than 255 when calling System.Drawing.Color.FromArgb(System.Int32). |
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme settings can be applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true. |
Remarks
This property must be initialized before applying the VisualTheme />
CanOverrideStyle
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.
Columns
Gets the Columns to be added for the MultiColumnComboBox.
Declaration
public ColumnCollection Columns { get; }
Property Value
Type |
---|
ColumnCollection |
ComboBoxRenderer
Update the renderer for VisualStyle based theme and Office2016 theme.
Declaration
protected override ComboBoxAdvRenderer ComboBoxRenderer { get; }
Property Value
Type |
---|
ComboBoxAdvRenderer |
Overrides
Filter
Gets or sets the filter for the underlying collection, which filters the data using required criteria.
Declaration
public Predicate<object> Filter { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | The default value is Null. The predicate handler should be handled in application level. |
Font
Gets or sets the System.Drawing.Font value for the control.
Declaration
public override Font Font { get; set; }
Property Value
Type |
---|
System.Drawing.Font |
Overrides
IntegralHeight
Indicates whether the control should resize to avoid showing partial items.
Declaration
public override bool IntegralHeight { get; set; }
Property Value
Type |
---|
System.Boolean |
Overrides
IsVisualStyleEnabled
Gets a value indicating whether the visual style based theme is applied to the control. This also indicates whether the theme files are referred from external assemblies or not.
Declaration
public bool IsVisualStyleEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Return true, if the visual style based theme is applied to control. Otherwise returns false. |
ItemCollection
Gets the Item Collection.
Declaration
public ItemRowCollection ItemCollection { get; }
Property Value
Type |
---|
ItemRowCollection |
ListBox
Gets the dropdown list box, which is an instance of the GridListBox associated with this combo.
Declaration
public virtual GridListBox ListBox { get; }
Property Value
Type |
---|
GridListBox |
MetroColor
Gets or sets the theme color of the MultiColumnComboBoxAdv
Declaration
public Color MetroColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
MultiColumn
Gets or sets a value indicating whether multiple columns or a single column should be shown in the dropdown.
Declaration
public virtual bool MultiColumn { get; set; }
Property Value
Type |
---|
System.Boolean |
Office2007ColorTheme
Gets or sets Office 2007 color scheme.
Declaration
public Office2007Theme Office2007ColorTheme { get; set; }
Property Value
Type |
---|
Office2007Theme |
Office2010ColorTheme
Gets or sets Office 2010 color scheme.
Declaration
public Office2010Theme Office2010ColorTheme { get; set; }
Property Value
Type |
---|
Office2010Theme |
ScrollMetroColorTable
Declaration
public MetroColorTable ScrollMetroColorTable { get; set; }
Property Value
Type |
---|
MetroColorTable |
SelectedIndex
Gets or sets the index of the currently selected item.
Declaration
public override int SelectedIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
Overrides
Remarks
Overriden.
ShowColumnHeader
Gets or sets a value indicating whether column headers should be displayed in the dropdown.
Declaration
public bool ShowColumnHeader { get; set; }
Property Value
Type |
---|
System.Boolean |
Style
Gets or sets an advanced appearance for this control.
Declaration
public VisualStyle Style { get; set; }
Property Value
Type |
---|
VisualStyle |
Text
Gets / sets text.
Declaration
public override string Text { get; set; }
Property Value
Type |
---|
System.String |
Overrides
ThemeName
Gets or sets the theme name of the control.
Declaration
public string ThemeName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null. |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
ThemeStyle
Gets or sets the MultiColumnComboBoxVisualStyle value used to customize the appearance of the
Declaration
public MultiColumnComboBoxVisualStyle ThemeStyle { get; set; }
Property Value
Type |
---|
MultiColumnComboBoxVisualStyle |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
Methods
ArgToRadians(Int64)
Declaration
protected static double ArgToRadians(long arg)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | arg |
Returns
Type |
---|
System.Double |
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Type |
---|
System.Windows.Forms.AccessibleObject |
Overrides
CreateListControl()
Creates the ListControl.
Declaration
protected override ListControl CreateListControl()
Returns
Type | Description |
---|---|
System.Windows.Forms.ListControl | Returns List control |
Overrides
DetachScrollFrame()
Detaches scrollersFrame from the PopupControl.
Declaration
protected void DetachScrollFrame()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
FindString(String)
Finds the first item in the combo box that matches the specified string.
Declaration
public override int FindString(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | String for searching |
Returns
Type | Description |
---|---|
System.Int32 | Returns the Found index |
Overrides
FindString(String, Int32)
Finds the first item in the combo box that matches the specified string.
Declaration
public override int FindString(string s, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | string for searching |
System.Int32 | startIndex | Start Index |
Returns
Type | Description |
---|---|
System.Int32 | Returns the Found index |
Overrides
FindStringExact(String)
Finds the first item in the combo box that matches the specified string.
Declaration
public override int FindStringExact(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | String for searching |
Returns
Type | Description |
---|---|
System.Int32 | Returns the Found index |
Overrides
FindStringExact(String, Boolean)
Finds the first item in the combo box that matches the specified string.
Declaration
public override int FindStringExact(string text, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | String text |
System.Boolean | ignoreCase | Bool value for ignore case |
Returns
Type | Description |
---|---|
System.Int32 | Returns the found index |
Overrides
FindStringExact(String, Int32)
Finds the first item in the combo box that matches the specified string.
Declaration
public override int FindStringExact(string s, int startIndex)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | string for searching |
System.Int32 | startIndex | Start Index |
Returns
Type | Description |
---|---|
System.Int32 | Returns the Found index |
Overrides
GetActiveThemeName()
Returns the active theme name.
Declaration
public string GetActiveThemeName()
Returns
Type |
---|
System.String |
InitListControl(ListControl)
Declaration
protected override void InitListControl(ListControl listControl)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.ListControl | listControl |
Overrides
InitPopupContainer()
Declaration
protected override void InitPopupContainer()
Overrides
NativeAdd(Object)
Declaration
protected override void NativeAdd(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item |
Overrides
NativeClear()
Declaration
protected override void NativeClear()
Overrides
NativeInsert(Int32, Object)
Declaration
protected override void NativeInsert(int index, object item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.Object | item |
Overrides
NativeRemoveAt(Int32)
Declaration
protected override void NativeRemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Overrides
OnBeforePopup()
Called before the popUp is displayed
Declaration
protected override void OnBeforePopup()
Overrides
Remarks
Overridden.Depending on the number of items set as MaxDropDownItems,ListBox adjusts its height.
OnDataManagerPositionChanged()
Declaration
protected override void OnDataManagerPositionChanged()
Overrides
OnDataSourceChanged(EventArgs)
Raises the DataSourceChanged event.
Declaration
protected override void OnDataSourceChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.EventArgs instance containing the event data. |
Overrides
Remarks
If Control's DataSource is null,then the ListBox DataSource resets to null
OnDisplayMemberChanged(EventArgs)
Raises the DisplayMemberChanged event.
Declaration
protected override void OnDisplayMemberChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.EventArgs instance containing the event data. |
Overrides
OnEnabledChanged(EventArgs)
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnKeyPress(KeyPressEventArgs)
Raises the KeyPress event
Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyPressEventArgs | e | contains the event data |
Overrides
OnListMouseUp(MouseEventArgs)
Raises the ListBox MouseUp event
Declaration
protected override void OnListMouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | contains the event data |
Overrides
OnPopupClosed(PopupClosedEventArgs)
Declaration
protected override void OnPopupClosed(PopupClosedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
PopupClosedEventArgs | e |
Overrides
OnReadOnlyChanged(EventArgs)
Declaration
protected override void OnReadOnlyChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnSelectionChangedByKey()
Raises the OnSelectionChangeByKey event
Declaration
protected override void OnSelectionChangedByKey()
Overrides
OnTextBoxKeyUp(KeyEventArgs)
Raises the textbox keyup event
Declaration
protected override void OnTextBoxKeyUp(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | e | contains the event data |
Overrides
ProcessDDMouseDown()
Declaration
protected override void ProcessDDMouseDown()
Overrides
RaiseThemeChanged(Object, ThemeChangedEventArgs)
Raises the ThemeNameChanged event when theme name changed.
Declaration
protected virtual void RaiseThemeChanged(object sender, ThemeChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender value. |
ThemeChangedEventArgs | args | A ThemeChangedEventArgs contains the event data. |
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | width | |
System.Int32 | height | |
System.Windows.Forms.BoundsSpecified | specified |
Overrides
SetItemsCore(IList)
Declaration
protected override void SetItemsCore(IList items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IList | items |
Overrides
UpdateListBoxBorderStyle()
Updates the list box border style.
Declaration
protected override void UpdateListBoxBorderStyle()
Overrides
UpdateText(Boolean)
Updates the Text property based on the PopupControl's selected value.
Declaration
public override bool UpdateText(bool fireEvent)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | fireEvent | Indicates whether the |
Returns
Type | Description |
---|---|
System.Boolean | True if the |
Overrides
Remarks
You normally do not have to call this method. However when you programmatically update the SelectedValue of a plug in the list control, you might have to call this method to update the combo's text based on that new value.
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Overrides
Events
ThemeNameChanged
Occurs when theme name of the control has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Type |
---|
ThemeChangedEventHandler |
Explicit Interface Implementations
IVisualStyle.VisualTheme
Gets or sets the VisualTheme of the control.
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.BaseThemeName
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.ControlName
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Type |
---|
System.String |