Andree
Andree

Reputation: 1199

How to set disable/reaonly Kendo UI controls

I have a form with various controls such as numeric boxes, comboboxes and datepickers. Is there a way how to disable/make them readonly all at once? Something like with the jQuery Mobile set the attribute and call the refresh() method.

Upvotes: 1

Views: 3264

Answers (2)

uygar donduran
uygar donduran

Reputation: 1207

You can use kendo's widgetInstance method.

$("[data-role]").each(function (index, el) {
   var widget = kendo.widgetInstance($(el));
   if (widget.enable) {
       widget.enable(false);
   }                
});

Upvotes: 6

Prabhakar Anbumani
Prabhakar Anbumani

Reputation: 11

You can achieve it by the below line of jQuery.

$("#yourdivid textarea, #yourdivid input, #yourdivid select").attr('disabled',true);

Upvotes: 0

Related Questions