RadMultiSelect for ASP.NET AJAX is based on the Kendo UI MultiSelect 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 MultiSelect on the server.
You can get Client-side Object Reference to the MultiSelect control in order to use its API like this:
var
RadMultiSelectObject = $find(
"<%=RadMultiSelect1.ClientID %>"
);
The most commonly used RadMultiSelect 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 MultiSelect.
You can find the full client-side API of the control in the RadMultiSelect Client-side API documentation article.
Get Client-side Object Reference to the Kendo MultiSelect widget in order to use its API
There are two ways to get a reference to the Kendo MultiSelect widget in order to use its API:
-
Use the get_kendoWidget method the RadMultiSelect client-side object exposes. You can get the RadMultiSelect object through the $find() MS AJAX method:
var
RadMultiSelectObject = $find(
"<%=RadMultiSelect1.ClientID %>"
);
//the standard script control object
var
kendoMultiSelectObject = RadMultiSelectObject.get_kendoWidget();
//the Kendo widget
-
Use the standard Kendo approach for getting the widget through the data-attributes of the DOM element:
var
kendoMultiSelectObject = $telerik.$(
"#<%=RadMultiSelect1.ClientID %>"
).data(
"kendoMultiSelect"
);
//the jQuery selector must get the RadMultiSelect1 select element