How to make my kendo dropdown list readonly?

2019-07-28 04:22发布

问题:

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.

回答1:

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);