简体   繁体   中英

How can i remove disabled attribute from KendoUI dropdown

How can i remove disabled attribute from kendo DropdownList input field?

I have input field shown below on button click i would like to enable it. Its disabled by default.

<input disabled="disabled" id="PersonStatusID" name="PersonStatusID" style="width: 100%; display: none;" value="5" data-role="dropdownlist" type="text">

I tried the following but none of them are working for me.

     document.getElementById('PersonStatusID').removeAttr('disabled');
     $("#PersonStatusID").data("kendoDropDownList").enable(true);
     $("#PersonStatusID").prop('disabled',false);
     document.getElementById('PersonStatusID').prop('disabled',false);

Would suggest the following:

 var list = $("#PersonStatusID").data("kendoDropDownList");
 list.enable(true);

Ref: https://www.telerik.com/forums/disable-enable-and-rebind-the-dropdownlist

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM