Search code examples
kendo-uikendo-dropdown

How to make my kendo dropdown list readonly?


I have a dropdownlist and i need to make it read only when user opens the page.But it needs to be enabled after click on edit icon.


Solution

  • You can do the following:

    var dataSource  =  $("#dropdownElement").data("kendoDropDownList");
    

    To make kendo dropdown read only:

    dataSource.readonly();
    

    To remove read only to kendo dropdown:

    dataSource.enable(true);