BinaryTextComboBox
BinaryTextComboBox - Specialist ComboBox class for handling "Text only" data.
public class BinaryTextComboBox : BinaryComboBox, IMessageFilter
Inherits from / implements: BinaryComboBox, IMessageFilter
Remarks
BinaryTextComboBox class represents the specialist class for handling "Text only" data.
Whenever you want to handle text based data (i.e., not dealing with Image support alongside text), you can use this class.
If you need to use Images alongside the ComboBox text data, please use BinaryImageComboBox class.
BinaryTextComboBox class is a typical .NET ComboBox class, except that it provides the following additional features:-
1. Ability to fully support "Control painting" with custom colors.
Also, the control exposes properties to smoothen the colors when painting the control, its borders and its item hovering/selection colors.
2. Mouse hovering effects.
3. Direct support for ComboBox text "Auto-completion". (Refer AutoComplete for more details)
4. Multi-column Drop list. (Refer DropStyleIsMultiColumn for more details)
Members at a glance
BinaryTextComboBox | Initializes a new instance of BinaryTextComboBox class. |
AlphaBlendingfactorForFilterAndGroupingPanelBackColor | Gets or sets the alpha blending factor to perform alpha blending of colors as described in the property EnableAlphaBlendingForFilterAndGroupingPanelBackColor. |
AnimateDropDownWindow | Gets or sets whether to animate the multi-column drop-down window when it is closed. |
AnimationInterval | Gets or sets the animation interval to be used while closing the multi-column drop-down list. |
AutoComplete | Gets or sets whether an Auto completion of ComboBox text is needed. |
AutoCompleteBasedOnCompleteMatchWithAnItemInTheList | Gets or sets whether to perform auto-completion of text based on the first item match from the available items, or to continue appending further suggestions based on other items of text which contain the user typed text. |
AutoCompleteIsCaseSensitive | Gets or sets whether the Auto completion feature is case sensitive. |
AutoCompleteMode | Provides a new implementation for the AutoCompleteMode. |
AutoCompleteStyleForMultiColumnModeIsMultiColumn | Gets or sets whether the autocomplete dropdown style is multi-column style or the single column style. |
BuiltinFilterOnNonStringTypeColumnFilterMode | How the built-in filter compares values in a column that does not hold text. |
BuiltinFilterOnStringTypeColumnFilterMode | How the built-in filter compares values in a column that holds text. |
BusyIndicatorText | Gets or sets the text that is displayed in the control's text area when the control is processing a large amount of data for displaying in the multicolumn list window. |
CSVFileSaveAs | Gets or sets the location where the CSV export file will be saved to, when the user requests that a given multi-column view data is saved to a CSV file. |
ColumnDataTypeFormatInfoContainers | Gets or sets the column data type format info containers. |
ColumnWidths | Gets or sets the column widths of the column headers representing the columns to display from a given DataTable, when displaying a multi-column drop-list. |
ColumnsToDisplay | Gets or sets a list of strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list. |
ComboBoxIsReadOnly | Gets or sets whether the current instance of BinaryTextComboBox will be read-only or not. |
CustomColumnNameForAutomaticRowSelection | Gets or sets the name of the column (relevant only for the multi-column mode) that should be used as the column using which the multi-column list will search for the row item value for automatic row selection. |
CustomComparerImplementor | Gets or sets the custom sorting implementation that you can provide to let the control to sort data in columns (while in multi-column drop list mode). |
CustomDropDownWindowLocationPoint | Gets or sets a custom screen coordinate at which to locate the drop-down window. |
CustomPaintingColor | Refer to the base class documentation CustomPaintingColor. |
DataMember | Gets or sets the column name from the associated data source, to be used for retrieving data when the DataSource property is set to a DataSet rather than anythig speicific like a DataTable or ArrayList etc. |
DataSource | Gets or sets the complex data-binding source - i.e. any source / object that implements any of these interfaces, viz., IList, IListSource or IBindingList. |
DataSourceViewCustomSortingExpression | Gets or sets the sorting expression to be used to sort and display the control. |
DesiredFilterColumn | Gets or sets the filtering option in the multi-column mode. |
DisplayMember | Provides a new implementation to the base DisplayMember property. |
DisplayStyleIsFlat | Gets or sets whether to display/render the control as a "Flat" styled control. |
DrawTheControlBasedOnWindowsOS | Gets or sets whether to automatically identify the current Windows OS and draw the control accordingly. |
DropDownWindowBackgroundColor | Gets or sets the view window background color for the control's drop down window. |
DropDownWindowDisplayOrientation | Gets or sets whether the drop-down window display is oriented to the left side or the right. |
DropStyleIsMultiColumn | Gets or sets whether the drop-down data is displayed in a multi-column list style. |
DroppedDown | Provides a new implementation for the base class property. |
EnableAlphaBlendingForFilterAndGroupingPanelBackColor | Gets or sets whether the color set in FilterAndGroupingPanelBackColor can be alpha-blended with Window, to provide a smooth color for rendering the filter/grouping options panel window. |
EnableColumnSorting | Gets or sets whether to allow sorting of columns in the multi-column drop list window. |
EnableDrawingHeaderFooterWhenInMultiColumnMode | Gets or sets whether to enable the extended header / footer areas, when displaying the drop-down window in multi-column display mode. |
EnableUserColumnResizing | Gets or sets whether the user can resize the columns (i.e. the columns of a multi-column drop-list) at run-time. |
EnforceItemsInList | Gets or sets whether to enforce user selection or typing-in of items only available form the control's current list of items. |
FilterAndGroupingPanelBackColor | Gets or sets the color to use for rendering the background for the filter and grouping options panel, in the multicolumn mode. |
FilteringIsON | Gets or sets the filtering option in the multi-column mode. |
GroupItemsWhenInMultiColumnDisplayMode | Gets or sets whether to display the items in multi-column display mode in the "grouped" mode, or to display items using the default tabular / grid mode. |
GroupMultiColumnDisplayModeDataBasedOnThisColumn | Gets or sets the column number to use from the associated DataSource data, to base the data grouping on. Refer to GroupItemsWhenInMultiColumnDisplayMode property for more details on grouping of the data. |
HeadersToDisplay | Gets or sets a list of custom header strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list. |
IsAutoCompleteModeAppendSuggestInMultiColumnMode | Whether auto-completion in multi-column mode both appends the completion to what has been typed and shows the suggestion list, rather than doing only one of the two. |
IsCustomisationOfColumnDisplayEnabledInMultiColumnAutoSuggestMode | Gets or sets a value indicating whether customisation of column display is enabled in multi column auto-suggest mode. |
IsFilterSearchResultBasedOnColumnDataType | Whether the built-in filter compares values using each column's declared data type rather than comparing everything as text. |
IsSourceDataPreSorted | Gets or sets a value indicating whether the control's source data is already sorted, and hence teh control should respect that sorted/ordered data when displaying it initially in its multi-column mode. |
ItemSelectionClick | Gets or sets the mouse clicks required to select an item from a multi-column drop-down list. |
KeepBindingContextInSyncWithParent | Gets or sets whether the multi-column mode combobox's data binding context should be in sync with the parent control (say for example, the hosting Form's) data binding context. |
KeepTheFilterAndGroupingViewsCollapsedAtStartUp | Gets or sets a value indicating whether to keep the filter and grouping views (in multi-column mode) collapsed at start up. |
KeepTheFilterAndGroupingViewsPaneFullyCollapsedAtStartup | Gets or sets whether to keep the grouping and filtering page cfully collapsed, so that the users can at run-time click the "Show Options panel button" located at the bottom of the drop-down window and view it fully for applying filters and/or grouping. |
MultiColumnDefaultGroupedModeGroupSortingOrder | Gets or sets the default grouped mode group sorting order. |
MultiColumnDropDownSize | Gets or sets the size of the multi-column drop-down window, in logical (96 DPI) units. |
MultiColumnDropDownWindowConfigurationData | Gets or set instance of MultiColumnDropDownWindowConfiguration class, setup with the desired values for the drawing the header control that will display the multi-column drop-list window. |
MultiColumnDropListBackColor | Gets or sets the backcolor for the Multi-column drop list view. |
MultiColumnDropListFont | Gets or sets the multi-column drop list item font. |
MultiColumnDropListForeColor | Gets or sets the forecolor for the Multi-column drop list view. |
MultiColumnDropListGridLines | Gets or sets whether the Multi-column drop list view has grid lines around cells. |
MultiColumnDropListHoverSelection | Gets or sets whether an item in the multi-column drop list view is automatically selected when the mouse pointer remains over the item for a few seconds. |
MultiColumnDropListWindowIsResizable | Gets or sets whether the multi-column drop list window's border is sizable or not. |
MultiColumnDroplistWindowAnimationStyle | Gets or sets the animation style for closing the multi-column dropdown window. |
MultiColumnModeSourceDataSortedColumnIndex | Gets or sets the index of the source data sorted column. |
MultiColumnViewBusyProcessingText | Gets or sets the multi column view busy processing text. |
MultiColumnViewNoDataFoundText | Gets or sets the multi column view no data found text. |
MultiColumnViewSortingGlyphColor | Gets or sets the color of the multi column view sorting glyph. |
MultiColumnViewUIElementsTextProvider | Gets or sets an instance of MultiColumnViewUIElementsTextProvider class, to set localized values for various UI elements in the multi-column view window. |
RaiseNotInListWhenTyping | Gets or sets whether to raise the NotInList event when the user is typing-in the text into the text area of the control. |
SelectedIndexFromDropList | Gets or sets the currently selected DataRow index from the multi-column drop list. |
SelectedValue | Gets or sets the value of the member property specified by the ValueMember property. |
ShareCustomMultiColumnSizeAcrossDataListAndFilterGroupingOptionsPane | Whether a width the user sets on the multi-column list also applies to the filter and grouping options pane, so the two stay the same width. |
ShouldAllowDragDropOfColumns | Gets or sets whether to allow users to drag and drop columns in the multi-column drop-list window. |
ShouldAllowUserInputWhileProcessingMultiColumnAutoCompleDropDownView | Gets or sets a value indicating whether the should allow user input while still showing and processing the multi column auto-complete drop down view. |
ShouldPersistUserSetColumnWidthsAcrossFilterSessions | Whether column widths the user has dragged survive a filter being applied and cleared, rather than reverting to the calculated widths. |
ShowDropDownMultiColumnWindowAfterAdjustingForVirtualAvaliableScreenSpace | Gets or sets whether to adjust the display location of the drop-down (multi-column) window, when the BinaryTextComboBox control is positioned in the form in such a location that when the container (say, the Form) is run, there is no available space to display the drop-down multi-column window completely. |
ShowEmptyDropListViewWhenThereAreNoData | Gets or sets as to whether to show an empty drop-list window when the user clicks on the combobox drop-down button, and there is no data to display. |
ShowFilterOptionsInMultiColumnMode | Gets or sets whether to show the "filter and grouping" options window, when in multi-column mode. |
SizeForMultiColumnAutoCompleteSuggestionDropDownWindow | Gets or sets a custom size for the auto-completion suggestion list drop-down window. |
SizesForMultiColumnAutoCompleteSuggestionDropDownWindowColumns | Gets or sets the sizes for multi-column auto-complete suggestion drop-down window columns. |
TableToLoad | Gets or sets a DataTable as the DataSource to load the data from, when displaying a multi-column drop-list. |
ValueMember | Provides a new implementation to the base ValueMember property. |
CloseMultiColumnDropDownListWindow | Closes the multi-column drop-down if it is open. Safe to call when it is not. |
Dispose | Refer to base class documentation. |
GetRowDataString | Returns the display text for one row of the bound data source, formatted according to the column's data type settings. |
GetTheColumnValue | Gets the column value from the attached DataSource data source, based on a given row index and a column name. |
MakeBlank | // Gets or sets a value indicating whether the control will display blank text to start with, until the user selects an item from the drop-down list. // |
OnDropDown | Refer to base class documentation. |
OnKeyDown | Raises the KeyDown event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior. |
OnKeyUp | Refer to base class documentation. |
OnLeave | Refer to base class documentation. |
OnSelectedIndexChanged | Refer to base class documentation. |
OnTextChanged | Raises the TextChanged event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior. |
PaintControlWithData | This is a specialist painting override. Do not override this method with any special/custom code. |
PreFilterMessage | Sees Windows messages before they reach their target, which is how the control notices a click outside its drop-down and closes it. |
RefreshPaint | This is a specialist painting override. Do not override this method with any special/custom code. |
SetData | This is a specialist painting override. Do not override this method with any special/custom code. |
WndProc | Refer to base class documentation. |
AutoCompleting | THis event is raised just before the automatic auto completion is about to be performed (i.e. if the property AutoComplete has been set to true). |
CustomSorting | This event is raised when a column is clicked in the multi-column drop list window. |
DropDownAboutToBeShown | This event is raised when the user clicks on the combobox and the drop-list window is about to be displayed. |
NotInList | This event is raised whenever the user types-in a text in the control's text area and tabs to a different control (i.e. when the control's Leave event occurs) and the user-typed text does not match any items in the current list of items in the control's list. |
Constructors
BinaryTextComboBox
Initializes a new instance of BinaryTextComboBox class.
Properties
AlphaBlendingfactorForFilterAndGroupingPanelBackColor
Gets or sets the alpha blending factor to perform alpha blending of colors as described in the property EnableAlphaBlendingForFilterAndGroupingPanelBackColor.
AnimateDropDownWindow
Gets or sets whether to animate the multi-column drop-down window when it is closed.
You can set your chosen timer interval for animation, by setting the property
AnimationInterval. AnimationInterval
Gets or sets the animation interval to be used while closing the multi-column drop-down list.
AnimateDropDownWindow for more details.AutoComplete
Gets or sets whether an Auto completion of ComboBox text is needed.
Value. A bool value.
This feature is available only when the instance's
ComboBoxStyle property is set to DropDown. By default, this property is set to true. If you need to disable the auto-completion feature, simply set this property to false.
AutoCompleteBasedOnCompleteMatchWithAnItemInTheList
Gets or sets whether to perform auto-completion of text based on the first item match from the available items, or to continue appending further suggestions based on other items of text which contain the user typed text.
AutoCompleteIsCaseSensitive
Gets or sets whether the Auto completion feature is case sensitive.
Value. A bool value.
By default, the
AutoComplete feature is case-sensitive and hence this property is set to true. If you need the Auto completion feature without case-sensitiveness, simply set this property to false. AutoCompleteMode
Provides a new implementation for the AutoCompleteMode.
AutoCompleteStyleForMultiColumnModeIsMultiColumn
Gets or sets whether the autocomplete dropdown style is multi-column style or the single column style.
If you set this property to false, the control will display the autocompletion list as a single column list - i.e. will display only the relevant values as is available from the DisplayMember column, and not from all columns.
BuiltinFilterOnNonStringTypeColumnFilterMode
How the built-in filter compares values in a column that does not hold text.
BuiltinFilterOnStringTypeColumnFilterMode
How the built-in filter compares values in a column that holds text.
BusyIndicatorText
Gets or sets the text that is displayed in the control's text area when the control is processing a large amount of data for displaying in the multicolumn list window.
CSVFileSaveAs
Gets or sets the location where the CSV export file will be saved to, when the user requests that a given multi-column view data is saved to a CSV file.
ColumnDataTypeFormatInfoContainers
Gets or sets the column data type format info containers.
ColumnWidths
Gets or sets the column widths of the column headers representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
Value. A int array.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox txtCmbBx = new BinaryTextComboBox(); txtCmbBx.DataSource = theTable; txtCmbBx.DisplayMember = "Revenue"; txtCmbBx.ValueMember = "Country"; txtCmbBx.SelectedValue = "USA"; txtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; txtCmbBx.HeadersToDisplay = new string[]{"Country name","Platform used","Revenue earned"}; txtCmbBx.MultiColumnDropListBackColor = Color.LightGreen; txtCmbBx.MultiColumnDropListForeColor = Color.DarkGreen; txtCmbBx.MultiColumnDropListGridLines = true; txtCmbBx.MultiColumnDropListHoverSelection = true; txtCmbBx.MultiColumnDropListFont = new Font("Times New Roman", (float)(11.0)); int [] intary = {15,15,25}; txtCmbBx.ColumnWidths = intary; txtCmbBx.DropStyleIsMultiColumn = true;
ColumnsToDisplay
Gets or sets a list of strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
Value. A string array.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox TxtCmbBx = new BinaryTextComboBox(); TxtCmbBx.DataSource = theTable; TxtCmbBx.DisplayMember = "Country"; TxtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; TxtCmbBx.DropStyleIsMultiColumn = true;
Here you can see that the
DisplayMember property is set to one particular Column of the DataTable. Based on the above, when the user clicks the drop-down button of the control, a multi-column drop-down list will be displayed with the above set data, and once the user selects a data item from the list, the corresponding DisplayMember value of the user selected item will be set as the BinaryTextComboBox text value.ComboBoxIsReadOnly
Gets or sets whether the current instance of BinaryTextComboBox will be read-only or not.
Value. A Bool value.
Which means, your users can copy the combobox text to clipboard (from its edit window), but won't be able to edit it.
By default, this property is set to false.
CustomColumnNameForAutomaticRowSelection
Gets or sets the name of the column (relevant only for the multi-column mode) that should be used as the column using which the multi-column list will search for the row item value for automatic row selection.
CustomComparerImplementor
Gets or sets the custom sorting implementation that you can provide to let the control to sort data in columns (while in multi-column drop list mode).
CustomSortingHandler for detailed discussion on the usage.CustomDropDownWindowLocationPoint
Gets or sets a custom screen coordinate at which to locate the drop-down window.
CustomPaintingColor
Refer to the base class documentation CustomPaintingColor.
DataMember
Gets or sets the column name from the associated data source, to be used for retrieving data when the DataSource property is set to a DataSet rather than anythig speicific like a DataTable or ArrayList etc.
DataSource
Gets or sets the complex data-binding source - i.e. any source / object that implements any of these interfaces, viz., IList, IListSource or IBindingList.
DataSet object, ensure you also set the DataMember property that needs to be used to pick up the relevant DataTable from the given DataSet object. If you do not set the
DataMember property when you associate a DataSet object as the DataSource, then control will automatically attempt to use the first table in the DataSet (if there is one available) as the DataMember value, to populate the multi-column data.DataSourceViewCustomSortingExpression
Gets or sets the sorting expression to be used to sort and display the control.
DesiredFilterColumn
Gets or sets the filtering option in the multi-column mode.
DisplayMember
Provides a new implementation to the base DisplayMember property.
DisplayStyleIsFlat
Gets or sets whether to display/render the control as a "Flat" styled control.
Note:This property will not have any effect when
DrawTheControlBasedOnWindowsOS is set to true.DrawTheControlBasedOnWindowsOS
Gets or sets whether to automatically identify the current Windows OS and draw the control accordingly.
If you need to draw the control with its "flat" style irrespective of the Windows OS or if you have a need to switch between "flat" and "non-flat" style modes of the control deterministically, then set this property to false and use the
DisplayStyleIsFlat property accordingly. DropDownWindowBackgroundColor
Gets or sets the view window background color for the control's drop down window.
DropDownWindowDisplayOrientation
Gets or sets whether the drop-down window display is oriented to the left side or the right.
DropStyleIsMultiColumn
Gets or sets whether the drop-down data is displayed in a multi-column list style.
Value. A bool value.
To enable this feature, you must set the following properties:-
1.
DataSource 2.
ValueMember 3.
DisplayMember Once you have set these properties to valid values, the control is instantly enabled with a multi-column style drop-down list, which will be visible when the user clicks on the control's drop-down button.
Note: This feature is available only with the BinaryTextComboBox class. By default, this property is set to false. If you need to enable this feature, simply set this property to true .
The control supports using multi-column drop style with
DropDown style as well!DroppedDown
Provides a new implementation for the base class property.
EnableAlphaBlendingForFilterAndGroupingPanelBackColor
Gets or sets whether the color set in FilterAndGroupingPanelBackColor can be alpha-blended with Window, to provide a smooth color for rendering the filter/grouping options panel window.
EnableColumnSorting
Gets or sets whether to allow sorting of columns in the multi-column drop list window.
EnableUserColumnResizing
Gets or sets whether the user can resize the columns (i.e. the columns of a multi-column drop-list) at run-time.
EnforceItemsInList
Gets or sets whether to enforce user selection or typing-in of items only available form the control's current list of items.
NotInList event, which you can handle accordingly using NotInListHandler delegate.FilterAndGroupingPanelBackColor
Gets or sets the color to use for rendering the background for the filter and grouping options panel, in the multicolumn mode.
FilteringIsON
Gets or sets the filtering option in the multi-column mode.
GroupItemsWhenInMultiColumnDisplayMode
Gets or sets whether to display the items in multi-column display mode in the "grouped" mode, or to display items using the default tabular / grid mode.
GroupMultiColumnDisplayModeDataBasedOnThisColumn
Gets or sets the column number to use from the associated DataSource data, to base the data grouping on. Refer to GroupItemsWhenInMultiColumnDisplayMode property for more details on grouping of the data.
HeadersToDisplay
Gets or sets a list of custom header strings representing the columns to display from a given DataTable, when displaying a multi-column drop-list.
Value. A string array.
The following code example (in C# .NET) will illustrate the usage of this property and other associated properties in order to display a multi-column list drop down. DataTable theTable = new DataTable("Customers"); theTable.Columns.Add("Country",typeof(System.String)); theTable.Columns.Add("Platform",typeof(System.String)); theTable.Columns.Add("Revenue",typeof(System.String)); DataRow theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$100,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "U.K"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "£300,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "USA"; theRow["Platform"] = "COM+"; theRow["Revenue"] = "$550,000"; theTable.Rows.Add(theRow); theRow = theTable.NewRow(); theRow["Country"] = "New Zealand"; theRow["Platform"] = ".NET"; theRow["Revenue"] = "$1100,000"; theTable.Rows.Add(theRow); BinaryTextComboBox txtCmbBx = new BinaryTextComboBox(); txtCmbBx.DataSource = theTable; txtCmbBx.DisplayMember = "Country"; txtCmbBx.ColumnsToDisplay = new string[]{"Country","Platform","Revenue"}; txtCmbBx.HeadersToDisplay = new string[]{"Country name","Platform used","Revenue earned"}; txtCmbBx.DropStyleIsMultiColumn = true;
Here you can see that the
DisplayMember property is set to one particular Column of the DataTable. Based on the above, when the user clicks the drop-down button of the control, a multi-column drop-down list will be displayed with the above set data, and once the user selects a data item from the list, the corresponding DisplayMember value of the user selected item will be set as the BinaryTextComboBox text value.IsAutoCompleteModeAppendSuggestInMultiColumnMode
Whether auto-completion in multi-column mode both appends the completion to what has been typed and shows the suggestion list, rather than doing only one of the two.
IsCustomisationOfColumnDisplayEnabledInMultiColumnAutoSuggestMode
Gets or sets a value indicating whether customisation of column display is enabled in multi column auto-suggest mode.
IsFilterSearchResultBasedOnColumnDataType
Whether the built-in filter compares values using each column's declared data type rather than comparing everything as text.
IsSourceDataPreSorted
Gets or sets a value indicating whether the control's source data is already sorted, and hence teh control should respect that sorted/ordered data when displaying it initially in its multi-column mode.
ItemSelectionClick
Gets or sets the mouse clicks required to select an item from a multi-column drop-down list.
By default, the selection click is set to ItemSelectionClick.DoubleClick.
For more details, please refer the enumeration
ItemSelectionClick.KeepBindingContextInSyncWithParent
Gets or sets whether the multi-column mode combobox's data binding context should be in sync with the parent control (say for example, the hosting Form's) data binding context.
KeepTheFilterAndGroupingViewsCollapsedAtStartUp
Gets or sets a value indicating whether to keep the filter and grouping views (in multi-column mode) collapsed at start up.
Value. true if to keep the filter and grouping views (in multi-column mode) collapsed at start up; otherwise, false .
KeepTheFilterAndGroupingViewsPaneFullyCollapsedAtStartup
Gets or sets whether to keep the grouping and filtering page cfully collapsed, so that the users can at run-time click the "Show Options panel button" located at the bottom of the drop-down window and view it fully for applying filters and/or grouping.
MultiColumnDefaultGroupedModeGroupSortingOrder
Gets or sets the default grouped mode group sorting order.
MultiColumnDropDownSize
Gets or sets the size of the multi-column drop-down window, in logical (96 DPI) units.
Empty, the default, sizes the window to show every column in full and about a dozen rows. Any other value is the size to open at, scaled to the display the combo box is on - like every metric in the suite, a value in a form's designer file keeps meaning what it meant at 100%. Either way the window is kept within the working area of that display, and opens above the combo box when there is more room there. When the user resizes the window, the size they chose is stored here, in logical units, and the next open uses it.MultiColumnDropDownWindowConfigurationData
Gets or set instance of MultiColumnDropDownWindowConfiguration class, setup with the desired values for the drawing the header control that will display the multi-column drop-list window.
MultiColumnDropListBackColor
Gets or sets the backcolor for the Multi-column drop list view.
DropStyleIsMultiColumn property for more details.MultiColumnDropListFont
Gets or sets the multi-column drop list item font.
MultiColumnDropListForeColor
Gets or sets the forecolor for the Multi-column drop list view.
DropStyleIsMultiColumn property for more details.MultiColumnDropListGridLines
Gets or sets whether the Multi-column drop list view has grid lines around cells.
DropStyleIsMultiColumn property for more details.MultiColumnDropListHoverSelection
Gets or sets whether an item in the multi-column drop list view is automatically selected when the mouse pointer remains over the item for a few seconds.
DropStyleIsMultiColumn property for more details.MultiColumnDropListWindowIsResizable
Gets or sets whether the multi-column drop list window's border is sizable or not.
MultiColumnDroplistWindowAnimationStyle
Gets or sets the animation style for closing the multi-column dropdown window.
AnimateDropDownWindow to true.MultiColumnModeSourceDataSortedColumnIndex
Gets or sets the index of the source data sorted column.
Value. The index of the source data sorted column.
MultiColumnViewBusyProcessingText
Gets or sets the multi column view busy processing text.
Value. The multi column view busy processing text.
MultiColumnViewNoDataFoundText
Gets or sets the multi column view no data found text.
Value. The multi column view no data found text.
MultiColumnViewSortingGlyphColor
Gets or sets the color of the multi column view sorting glyph.
Value. The color of the multi column view sorting glyph.
MultiColumnViewUIElementsTextProvider
Gets or sets an instance of MultiColumnViewUIElementsTextProvider class, to set localized values for various UI elements in the multi-column view window.
RaiseNotInListWhenTyping
Gets or sets whether to raise the NotInList event when the user is typing-in the text into the text area of the control.
NotInList is raised when the user types in some text into the control and moves out of the control by hitting the TAB key (thereby losing focus out of control). If you want the event to be raised as and when the user types in text into the control and the control's list does not have an item that is so far typed in by the user, then set this property to true. The control will then raise the NotInList event as and when the user types in text and it is not found in the control's list of item data. By default, the value of this property is false.
SelectedIndexFromDropList
Gets or sets the currently selected DataRow index from the multi-column drop list.
Value. An integer value.
With version 2, BinaryTextComboBox class supports the DropDown combobox style, so that it allows your users to type in text into the combobox.
Note: When using the control in Multi-style drop list mode, never use the standard SelectedIndex property. Use only the
SelectedIndexFromDropList property instead. But of course to capture the event of item selection, use the standard
SelectedIndexChanged event. SelectedValue
Gets or sets the value of the member property specified by the ValueMember property.
ShouldAllowDragDropOfColumns
Gets or sets whether to allow users to drag and drop columns in the multi-column drop-list window.
ShouldAllowUserInputWhileProcessingMultiColumnAutoCompleDropDownView
Gets or sets a value indicating whether the should allow user input while still showing and processing the multi column auto-complete drop down view.
ShouldPersistUserSetColumnWidthsAcrossFilterSessions
Whether column widths the user has dragged survive a filter being applied and cleared, rather than reverting to the calculated widths.
ShowDropDownMultiColumnWindowAfterAdjustingForVirtualAvaliableScreenSpace
Gets or sets whether to adjust the display location of the drop-down (multi-column) window, when the BinaryTextComboBox control is positioned in the form in such a location that when the container (say, the Form) is run, there is no available space to display the drop-down multi-column window completely.
BinaryTextComboBox is run with DropStyleIsMultiColumn property set to "true".ShowEmptyDropListViewWhenThereAreNoData
Gets or sets as to whether to show an empty drop-list window when the user clicks on the combobox drop-down button, and there is no data to display.
ShowFilterOptionsInMultiColumnMode
Gets or sets whether to show the "filter and grouping" options window, when in multi-column mode.
SizeForMultiColumnAutoCompleteSuggestionDropDownWindow
Gets or sets a custom size for the auto-completion suggestion list drop-down window.
Refer to the related property
AutoCompleteStyleForMultiColumnModeIsMultiColumn.SizesForMultiColumnAutoCompleteSuggestionDropDownWindowColumns
Gets or sets the sizes for multi-column auto-complete suggestion drop-down window columns.
TableToLoad
Gets or sets a DataTable as the DataSource to load the data from, when displaying a multi-column drop-list.
Value. A DataTable object.
Please refer to a detailed code example in
ColumnsToDisplay, which illustrates the usage of this property as well as other related properties. NOTE: This property is a legacy property and is deprecated. Use the control's DataSource property instead, which can accept all sorts of data sources that implement IList, IListSource or IBindingList interfaces.
ValueMember
Provides a new implementation to the base ValueMember property.
Methods
CloseMultiColumnDropDownListWindow
Closes the multi-column drop-down if it is open. Safe to call when it is not.
Dispose
Refer to base class documentation.
GetRowDataString
Returns the display text for one row of the bound data source, formatted according to the column's data type settings.
- index
- The row to read.
Returns. The text to draw for that row.
GetTheColumnValue
Gets the column value from the attached DataSource data source, based on a given row index and a column name.
- desiredRowIndex
- Specify the zero-based index of the desired row from the attached DataSource /
DataSource. - desiredColumnName
- Specify the desired column name from the attached DataSource /
DataSource.
MakeBlank
// Gets or sets a value indicating whether the control will display blank text to start with, until the user selects an item from the drop-down list. //
OnDropDown
Refer to base class documentation.
OnKeyDown
Raises the KeyDown event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnKeyUp
Refer to base class documentation.
OnLeave
Refer to base class documentation.
OnSelectedIndexChanged
Refer to base class documentation.
OnTextChanged
Raises the TextChanged event. BinaryTextComboBox overrides it so the control's own handling runs alongside the base behavior.
- te
- The data for the event.
PaintControlWithData
This is a specialist painting override. Do not override this method with any special/custom code.
PreFilterMessage
Sees Windows messages before they reach their target, which is how the control notices a click outside its drop-down and closes it.
- m
- The message about to be dispatched.
Returns. true to stop the message being dispatched.
RefreshPaint
This is a specialist painting override. Do not override this method with any special/custom code.
SetData
This is a specialist painting override. Do not override this method with any special/custom code.
WndProc
Refer to base class documentation.
Events
AutoCompleting
THis event is raised just before the automatic auto completion is about to be performed (i.e. if the property AutoComplete has been set to true).
CustomSorting
This event is raised when a column is clicked in the multi-column drop list window.
CustomSortingHandler for detailed discussion on the usage. Note: To be able to use this event, the
EnableColumnSorting property must have been set to true. DropDownAboutToBeShown
This event is raised when the user clicks on the combobox and the drop-list window is about to be displayed.
DropDownProcessHandler for more details.NotInList
This event is raised whenever the user types-in a text in the control's text area and tabs to a different control (i.e. when the control's Leave event occurs) and the user-typed text does not match any items in the current list of items in the control's list.