If I add some options and save it, after reloading the page it should be shown in dropdown and it should be unclickable. I use the ("#OpsLead_taglist").prop("disabled", true)
, value is not showing in the dropdown list. Otherwise it is not making readonly. As per criteria it should be readonly and can add new lists in that dropdown. Kindly suggest me. I can't handle this.
Source Code:
var opsmultiselect = $("#OpsLead").data("kendoMultiSelect");
$(this).attr("disabled", true);//not working
If you want to prevent some items from being deselected you could do this by decorating them with a css-class and let the eventlistener decide whether to prevent the deselection or not.
function onDeselect(e){
if($(e.item).hasClass("k-state-disabled")) {
e.preventDefault();
}
}
You can use something like this:
//To make it readonly
$("#OpsLead").data("kendoMultiSelect").readonly(true);
//To make it editable again
$("#OpsLead").data("kendoMultiSelect").readonly(false);
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.