New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Client-side API

Select Movie

  • Demo Configurator
API Functions
Filter
  • Contains
Select

RadMultiColumnComboBox for ASP.NET AJAX is based on the Kendo UI MultiColumnComboBox Widget. Thus, it exposes the Client-side API and methods offered by the widget and mainly provides a wrapper and API for working with the MultiColumnComboBox on the server.
You can get Client-side Object Reference to the MultiColumnComboBox control in order to use its API like this:

var radMultiColumnComboBoxObject = $find("<%=RadMultiColumnComboBox1.ClientID %>");

The most commonly used RadMultiColumnComboBox client-side methods are:

  • set_enabled—Enables or disables the widget.
  • set_readOnly—Toggles the readonly state of the widget. When the widget is readonly it doesn't allow user input.
  • open—Opens the popup.
  • close—Closes the widget popup.
  • toggle—Opens or closes the widget popup.
  • search—Searches the data source for the provided value and displays any matches as suggestions.
  • get_value and set_value—Gets or sets the value of the MultiColumnComboBox.
  • get_text and set_text—Gets or sets the text of the MultiColumnComboBox. Widget will select the item with same text. If there are no matches then the text will be considered as a custom value of the widget.

You can find the full client-side API of the control in the RadMultiColumnComboBox Client-side API documentation article.


Get Client-side Object Reference to the Kendo MultiColumnComboBox widget in order to use its API

There are two ways to get a reference to the Kendo MultiColumnComboBox widget in order to use its API:

  • Use the get_kendoWidget method the RadMultiColumnComboBox client-side object exposes. You can get the RadMultiColumnComboBox object through the $find() MS AJAX method:

    var radMultiColumnComboBoxObject  = $find("<%=RadMultiColumnComboBox1.ClientID %>"); //the standard script control object
    var kendoMultiColumnComboBoxObject = radMultiColumnComboBoxObject.get_kendoWidget(); //the Kendo widget

  • Use the standard Kendo approach for getting the widget through the data-attributes of the DOM element:

    var kendoMultiColumnComboBoxObject = $telerik.$("#<%=RadMultiColumnComboBox1.ClientID %>").data("kendoMultiColumnComboBox"); //the jQuery selector must get the RadMultiColumnComboBox1 span element

  • DefaultCS.aspx
  • scripts.js
<%@ Page Language="c#" AutoEventWireup="true"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="scripts.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-narrow">
        <h3>Select Movie</h3>
        <telerik:RadMultiColumnComboBox runat="server" ID="RadMultiColumnComboBox1"
            Filter="contains" FilterFields="text,value"
            Height="400" Width="100%"
            DataTextField="text"
            DataValueField="value">
            <PopupSettings />
            <ClientEvents OnLoad="onLoad" />
            <ColumnsCollection>
                <telerik:MultiColumnComboBoxColumn Field="text" Title="Text" />
                <telerik:MultiColumnComboBoxColumn Field="value" Title="Value" />
            </ColumnsCollection>
        </telerik:RadMultiColumnComboBox>
        <telerik:RadCodeBlock runat="server">
            <script>
                function pageLoadHandler() {
                    window.multicolumncombo = $find("<%= RadMultiColumnComboBox1.ClientID %>");
                    window.rtbFilterText = $find("<%= rtbFilterText.ClientID %>");
                    window.rtbIndex = $find("<%= rtbIndex.ClientID %>");
                    window.rtbValue = $find("<%= rtbValue.ClientID %>");
                }
                Sys.Application.add_load(pageLoadHandler);
            </script>
        </telerik:RadCodeBlock>
    </div>
    <asp:Panel runat="server" ID="loadingPanelWrapper">
        <qsf:ConfiguratorPanel runat="server" ID="rmccbConfigurationPanel">
            <Views>
                <qsf:View>
                    <qsf:ConfiguratorColumn runat="server" Size="Medium" Title="API Functions">
                        <ul class="fb-group">
                            <li>
                                <qsf:Button Width="100" ID="rbEnable" Text="Enable" AutoPostBack="false" runat="server" OnClientClicked="enableHandler" />
                                <qsf:Button Width="100" ID="rbDisable" Text="Disable" AutoPostBack="false" runat="server" OnClientClicked="disableHandler" />
                            </li>
                            <li>
                                <qsf:Button Width="205" ID="rbReadonly" Text="Toggle Readonly" AutoPostBack="false" runat="server" OnClientClicked="readonlyHandler" />
                            </li>
                            <li>
                                <qsf:Button Width="100" ID="rbOpen" Text="Open" AutoPostBack="false" runat="server" OnClientClicked="openHandler" />
                                <qsf:Button Width="100" ID="rbClose" Text="Close" AutoPostBack="false" runat="server" OnClientClicked="closeHandler" />
                            </li>
                            <li>
                                <qsf:Button Width="100" ID="rbGetValue" Text="Get value" AutoPostBack="false" runat="server" OnClientClicked="getValueHandler" />
                                <qsf:Button Width="100" ID="rbGetText" Text="Get text" AutoPostBack="false" runat="server" OnClientClicked="getTextHandler" />
                            </li>
                        </ul>
                    </qsf:ConfiguratorColumn>
                    <qsf:ConfiguratorColumn runat="server" Size="Narrow" Title="Filter">
                        <ul class="fb-group">
                            <li>
                                <qsf:DropDownList ID="rddlFilter" Width="200" OnClientItemSelected="filterChanged" runat="server">
                                    <Items>
                                        <telerik:DropDownListItem Text="None" Value="none" />
                                        <telerik:DropDownListItem Text="Starts with" Value="startswith" />
                                        <telerik:DropDownListItem Text="Ends with" Value="endswith" />
                                        <telerik:DropDownListItem Text="Contains" Value="contains" Selected="true" />
                                        <telerik:DropDownListItem Text="Equals" Value="eq" />
                                    </Items>
                                </qsf:DropDownList>
                            </li>
                            <li>
                                <qsf:TextBox ID="rtbFilterText" ClientEvents-OnKeyPress="findItemHandler" Text="The" Width="200" runat="server" />
                            </li>
                            <li>
                                <qsf:Button ID="rbFindItem" Width="100" Text="Find item" AutoPostBack="false" runat="server" OnClientClicked="findItemHandler" />
                            </li>
                        </ul>
                    </qsf:ConfiguratorColumn>
                    <qsf:ConfiguratorColumn runat="server" Size="Wide" Title="Select">
                        <ul class="fb-group">
                            <li>
                                <qsf:TextBox ID="rtbIndex" Width="50" ClientEvents-OnValueChanged="selectByIndexHandler" Text="0" runat="server" />
                                <qsf:Button ID="rbSelectByIndex" Width="150" Text="Select by index" AutoPostBack="false" runat="server" OnClientClicked="selectByIndexHandler" />
                            </li>
                            <li>
                                <qsf:TextBox ID="rtbValue" Width="50" ClientEvents-OnValueChanged="selectByValueHandler" Text="1" runat="server" />
                                <qsf:Button ID="rbSelectByValue" Width="150" Text="Select by value" AutoPostBack="false" runat="server" OnClientClicked="selectByValueHandler" />
                            </li>
                        </ul>
                    </qsf:ConfiguratorColumn>
                </qsf:View>
            </Views>
        </qsf:ConfiguratorPanel>
    </asp:Panel>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance