Hi,
I have been playing around with Kendo to see whether we can use it in one of our projects. One of the things I am trying to achieve is to develop and unobtrusive interface on top of Kendo. The way I am going about this is as follows:
I have been playing around with Kendo to see whether we can use it in one of our projects. One of the things I am trying to achieve is to develop and unobtrusive interface on top of Kendo. The way I am going about this is as follows:
1. I mark the controls which I want to apply the Kendo UI to with a specific attributes, e.g. a textbox which should become a date picket I will mark with add a "data-ui-datepicker" attribute to.
2. I will then run javascripy once the page has loaded to call the appropriate Kendo methods for them, e.g. I will get all textboxes with the "data-ui-datepicker" attribute and call the kendoDataPicker() method on them.
This works fine but I also have sections of the page which is dynamically loaded. Once it is loaded I will again call the method to apply to Kendo UI to the controls. The problem is that the controls which already has the Kendo UI applied to then gets screwed up because it basically tries to apply the Kendo UI to the control a second time.
My question is whether you guys have any idea as to how I can work around this? Is there any way to determine whether a control already has the Kendo UI applied so that I then don't call the kendo...() method a second time?
Also, do you have any plans to supply some sort of unobtrusive framework on top of Kendo?
Hope this makes sense.
Thanks!
2. I will then run javascripy once the page has loaded to call the appropriate Kendo methods for them, e.g. I will get all textboxes with the "data-ui-datepicker" attribute and call the kendoDataPicker() method on them.
This works fine but I also have sections of the page which is dynamically loaded. Once it is loaded I will again call the method to apply to Kendo UI to the controls. The problem is that the controls which already has the Kendo UI applied to then gets screwed up because it basically tries to apply the Kendo UI to the control a second time.
My question is whether you guys have any idea as to how I can work around this? Is there any way to determine whether a control already has the Kendo UI applied so that I then don't call the kendo...() method a second time?
Also, do you have any plans to supply some sort of unobtrusive framework on top of Kendo?
Hope this makes sense.
Thanks!