This is a migrated thread and some comments may be shown as answers.
How to set all Kendo components within a Div to readonly
1 Answer 9 Views
This is a migrated thread and some comments may be shown as answers.
JP13
Top achievements
Rank 1
JP13 asked on 23 May 2019, 11:38 PM

I have a div that has 7 different elements that I want to make readonly.  Right now I have the following script that is setting all non kendo items to readonly

$("#GroupBox").find('input, label').attr("readonly", true)

 

I have 4 dropdownlists, 2 sliders, and 1 datepicker that I also want to make readonly.  I know that I can set each of them individually, but is there an easier way? something similar to what I can do for non kendo component?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 28 May 2019, 11:11 AM
Hello Jed,

Following is a dojo example with a possible implementation for achieving the desired behavior:
I have created a function that accepts the container element and "true" or "false" as a second parameter. The function will make all nested Kendo widgets in the container readonly (if the second parameter is "true").

Hope this helps.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
JP13
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or