Main scenarios: selecting an entity by multiple descriptive fields (e.g., Customers with ID, Name, City, Country columns) while only a single value (Value via DataValueField) is posted.
Data binding options:
- Server binding via DataSource / DataSourceID (automatic during page lifecycle).
- Client binding via web service (WebServiceSettings transport) for large or remote datasets.
Performance tips:
- Enable server paging (EnableServerPaging + PageSize) for large data sets.
- Enable server filtering (EnableServerFiltering) to avoid loading unneeded items; filtering logic executes remotely.
- Use virtualization settings (VirtualSettings) to reduce DOM size when many rows are visible.
Selection & validation: combine CausesValidation with ValidationGroup and AutoPostBack to trigger form validation on selection change.
Cascading: set CascadeFrom to the ID of another control; selected value of the parent is used to filter this control (requires matching configuration on the client/server data layer).
Related core members: Items, DataTextField, DataValueField, ColumnsCollection, DataKeyNames, ClientEvents.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
[EmbeddedSkin("DropdownGrid", typeof(RadMultiColumnComboBox))]
[EmbeddedSkin("DropdownGrid", "Default", typeof(RadMultiColumnComboBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Classic, typeof(RadMultiColumnComboBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadMultiColumnComboBox))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadMultiColumnComboBox))]
[ValidationProperty("Text")]
[ControlValueProperty("Value")]
[TelerikToolboxCategory("Data Editing")]
[ToolboxBitmap(typeof(RadMultiColumnComboBox), "Toolbox.Icons.MultiColumnComboBox.png")]
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(Html5MultiColumnComboBox))]
[ClientScriptResource("Telerik.Web.UI.RadMultiColumnComboBox", "Telerik.Web.UI.MultiColumnComboBox.Scripts.RadMultiColumnComboBox.js")]
public class RadMultiColumnComboBox : RadDataBoundControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, ICallbackEventHandler, IPostBackEventHandler
Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlRadMultiColumnComboBox...
Implements:
Inherited Members
Constructors
public RadMultiColumnComboBox()
Fields
protected StringBuilder dataBindData
Properties
Gets or sets a value indicating whether the paging in RadClientDataSource is enabled
The default is false.
public virtual bool AllowPaging { get; set; }
Configures the opening and closing animations of the suggestion popup. Setting the animation option to false will disable the opening and closing animations. As a result the suggestion popup will open and close instantly.
[PersistenceMode(PersistenceMode.InnerProperty)]
public Animation AnimationSettings { get; }
Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the RadComboBox selection.
[Bindable(false)]
public bool AutoPostBack { get; set; }
Set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from a list control.
This property can be used to allow automatic population of other controls on the Web page based on a user's selection from a list.
The value of this property is stored in view state.
The server-side event that is fired is SelectedIndexChanged.
Use it to set the Id of the parent MultiColumnComboBox widget.Help topic showing how cascading functionality works
public string CascadeFrom { get; set; }
Defines the field to be used to filter the data source. If not defined the parent's dataValueField option will be used.Help topic showing how cascading functionality works
public string CascadeFromField { get; set; }
Defines the parent field to be used to retain value from. This value will be used further to filter the dataSource. If not defined the value from the parent's dataValueField will be used.
public string CascadeFromParentField { get; set; }
Gets or sets a value indicating whether validation is performed when an item within the control is selected.
public virtual bool CausesValidation { get; set; }
true if validation is performed when an item is selected; otherwise, false. The default value is true.
By default, page validation is performed when an item is selected. Page validation determines whether the input controls associated with a validation control on the page all pass the validation rules specified by the validation control. You can specify or determine whether validation is performed on both the client and the server when an item is clicked by using the CausesValidation property. To prevent validation from being performed, set the CausesValidation property to false.
Unless this options is set to false, a button will appear when hovering the widget. Clicking that button will reset the widget's value and will trigger the change event.
public bool ClearButton { get; set; }
Defines the client events handlers.
[PersistenceMode(PersistenceMode.InnerProperty)]
public MultiColumnComboBoxClientEvents ClientEvents { get; }
Defines the columns rendered in the table of the MultiColumnComboBox.
[PersistenceMode(PersistenceMode.InnerProperty)]
public MultiColumnComboBoxColumnsCollection ColumnsCollection { get; }
The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()
protected override string CssClassFormatString { get; }
Overrides:
Gets or sets an array of data-field names that will be used to populate the MultiColumnComboBox's DataItem property which is used to populated the control's template. The field declared in the Columns are added by default.
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[TypeConverter(typeof(ListConverter))]
[PersistenceMode(PersistenceMode.Attribute)]
public virtual string[] DataKeyNames { get; set; }
An array that contains the names of the fields contained in the MultiColumnComboBox's DataItem property.
Note: The dataItem's properties declared in the template should be with lower case.
The field of the data item that provides the text content of the list items. The widget will filter the data source based on this field.
public string DataTextField { get; set; }
The field of the data item that provides the value of the widget.
public string DataValueField { get; set; }
The delay in milliseconds between a keystroke and when the widget displays the popup.
public double Delay { get; set; }
The width of the dropdown. Numeric values are treated as pixels.
public string DropDownWidth { get; set; }
If set to false the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.
public bool Enable { get; set; }
Gets or sets value indicating whether server-side filtering is enabled
public virtual bool EnableServerFiltering { get; set; }
Gets or sets value indicating whether server-side paging is enabled
public virtual bool EnableServerPaging { get; set; }
If set to true the widget will not show all items when the text of the search input cleared. By default the widget shows all items when the text of the search input is cleared. Works in conjunction with minLength.
public bool EnforceMinLength { get; set; }
The filtering method used to determine the suggestions for the current value. Filtration is turned off by default, and can be performed over string values only (either the widget's data has to be an array of strings, or over the field, configured in the dataTextField option). The supported filter values are startswith, endswith and contains.
public string Filter { get; set; }
Enables multicolumn filtering.
public string FilterFields { get; set; }
The template used to render the fixed header group. By default the widget displays only the value of the current group.
[Browsable(true)]
[Bindable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public string FixedGroupTemplate { get; set; }
The template used to render the footer template. The footer template receives the widget itself as a part of the data argument. Use the widget fields directly in the template.
[Browsable(true)]
[Bindable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public string FooterTemplate { get; set; }
Defines the field to be used to group the data source in web service binding scenario.
public string GroupByField { get; set; }
The template used to render the groups. By default the widget displays only the value of the group.
[Browsable(true)]
[Bindable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public string GroupTemplate { get; set; }
Specifies a static HTML content, which will be rendered as a header of the popup element.
[Browsable(true)]
[Bindable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public string HeaderTemplate { get; set; }
The height of the suggestion popup in pixels. The default value is 200 pixels.
[ClientControlProperty]
[ClientPropertyName("height")]
public override Unit Height { get; set; }
Overrides:
If set to true the first suggestion will be automatically highlighted.
public bool HighlightFirst { get; set; }
If set to false case-sensitive search will be performed to find suggestions. The widget performs case-insensitive searching by default.
public bool IgnoreCase { get; set; }
The index of the initially selected item. The index is 0 based.
public double Index { get; set; }
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual MultiColumnComboBoxItemCollection Items { get; }
The text messages displayed in the widget. Use this option to customize or localize the messages.
[PersistenceMode(PersistenceMode.InnerProperty)]
public Messages MessagesSettings { get; }
The minimum number of characters the user must type before a search is performed. Set to higher value than 1 if the search could match a lot of items.
public double MinLength { get; set; }
The template used to render the "no data" template, which will be displayed if no results are found or the underlying data source is empty. The noData template receives the widget itself as a part of the data argument. The template will be evaluated on every widget data bound.
[Browsable(true)]
[Bindable(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
public string NoDataTemplate { get; set; }
Gets or sets the maximum number of items that would appear on a page. Default value is 10.
public virtual int PageSize { get; set; }
The hint displayed by the widget when it is empty. Not set by default.
public string Placeholder { get; set; }
The options that will be used for the popup initialization. For more details about the available options refer to Popup documentation.
[PersistenceMode(PersistenceMode.InnerProperty)]
public Popup PopupSettings { get; }
Gets or sets the URL of the page to post to from the current page when a tab from the tabstrip is clicked.
[Themeable(false)]
public virtual string PostBackUrl { get; set; }
The URL of the Web page to post to from the current page when a tab from the tabstrip control is clicked. The default value is an empty string (""), which causes the page to post back to itself.
Contains settings about the schema and model of the data used in RadClientDataSource.
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual ClientDataSourceSchema Schema { get; }
If set to true the widget will automatically use the first suggestion as its value.
public bool Suggest { get; set; }
When set to true the widget will automatically set selected value to the typed custom text. Set the option to false to clear the selected value but keep the custom text.
public bool SyncValueAndText { get; set; }
protected override HtmlTextWriterTag TagKey { get; }
Overrides:
The text of the widget used when the autoBind is set to false.
[Browsable(false)]
[Bindable(true, BindingDirection.TwoWay)]
public string Text { get; set; }
Gets or sets the name of the validation group to which this validation control belongs.
[Bindable(true)]
public virtual string ValidationGroup { get; set; }
The name of the validation group to which this validation control belongs. The default is an empty string (""), which indicates that this property is not set.
This property works only when CausesValidation is set to true.
The value of the widget.
[Browsable(false)]
[Bindable(true, BindingDirection.TwoWay)]
public string Value { get; set; }
Specifies the value binding behavior for the widget when the initial model value is null. If set to true, the View-Model field will be updated with the selected item value field. If set to false, the View-Model field will be updated with the selected item.
public bool ValuePrimitive { get; set; }
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
public bool Virtual { get; set; }
Enables the virtualization feature of the widget. The configuration can be set on an object, which contains two properties - itemHeight and valueMapper.For detailed information, refer to the article on virtualization.
[PersistenceMode(PersistenceMode.InnerProperty)]
public Virtual VirtualSettings { get; }
Gets the web service settings to be used for binding this instance of RadMultiColumnComboBox.
[PersistenceMode(PersistenceMode.InnerProperty)]
public WebServiceDataSourceSettings WebServiceSettings { get; }
The web service settings.
Methods
protected virtual void BindItems(IEnumerable<MultiColumnComboBoxItem> items)
protected override void DescribeComponent(IScriptDescriptor descriptor)
Overrides:
protected virtual void DescribeItems(IScriptDescriptor descriptor)
Loads the posted content of the list control, if it is different from the last posting.
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
The key identifier for the control, used to index the postCollection.
postCollectionNameValueCollectionA NameValueCollection that contains value information indexed by control identifiers.
Returns:true if the posted content is different from the last posting; otherwise, false.
Overrides:
Raises the SelectedIndexChanged event. This allows you to handle the event directly.
protected virtual void OnSelectedIndexChanged()
protected override void PerformDataBinding(IEnumerable data)
Overrides:
Signals the RadComboBox control to notify the ASP.NET application that the state of the control has changed.
protected override void RaisePostDataChangedEvent()
Overrides:
protected virtual void RaiseSelectedIndexChandedEvent()
protected override void RenderContents(HtmlTextWriter writer)
Overrides:
protected override void TrackViewState()
Overrides:
Events
Occurs after an item is data bound to the RadComboBox control.
public event RadMultiColumnComboBoxItemEventHandler ItemDataBound
This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is nulled out and no longer available.
Occurs when the SelectedIndex property has changed.
public event RadMultiColumnComboBoxSelectedIndexChangedEventHandler SelectedIndexChanged
You can create an event handler for this event to determine when the selected index in the RadComboBox has been changed. This can be useful when you need to display information in other controls based on the current selection in the RadComboBox. You can use the event handler to load the information in the other controls.