Telerik Extensions for ASP.NET MVC

Version Q2 2012, released 06/07/2012

Client-side API

select

ComboBox client API

Chaiselect

DropDownList client API

About this example ASPXRazor

This example shows how to use the client-side API of Telerik ComboBox for ASP.NET MVC and Telerik DropDownList for ASP.NET MVC.

To use the client-side API you should first retrieve the combobox/dropdownlist client-side object. The following code snippet shows how to do this for the combobox:

<script type="text/javascript">
function getComboBox(){
    //"ComboBox" is the value specified by the Name() method.
    var combobox = $("#ComboBox").data("tComboBox");
    return combobox;
}
</script>

Available client-side methods:

  • You can open suggestion list with the open() method.
  • You can close suggestion list with the close() method.
  • You can select an item with the select(...). This method accepts a DOM element representing an existing item of the suggestion list, jQuery selector.
  • You can get value of the selected item value(). This method can be use also for setting value.
  • You can enable ComboBox or DropDownlist with the enable() method.
  • You can disable ComboBox or DropDownlist with the disable() method.

Interested in HTML5 and mobile-powered ASP.NET MVC apps?

Experience the next generation UI and framework for ASP.NET MVC development by downloading trial evaluation copy of Kendo UI Complete for ASP.NET MVC. Jumpstart your development with the available learning resources.

The differences between Telerik MVC Extensions and Kendo UI Complete for ASP.NET MVC, and their licensing models are explained here and here.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Other Demos: