This is a migrated thread and some comments may be shown as answers.

Creating a JS wrapper for kendo ui Web

2 Answers 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
VasVas
Top achievements
Rank 1
VasVas asked on 17 Nov 2013, 03:43 PM
I have been working with the MVC Wrappers and now I want to check the possibility of using Json bound kendo web controls with out a ViewModel.
I was wondering is there is a simple way of creating a simple Js wrapper that would create the element that the Kendo control would bind to and create a very smoth code instead of:
Html element 
JS $(#ElementName).kendowigit(data)...
Is the kendo team thinking of this has it been done.
The only like that resemble this is http://www.kendoui.com/blogs/teamblog/posts/12-04-03/creating_custom_kendo_ui_plugins.aspx
But one of the parameters the init function recieves is Element.

Yours,

Ariel

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 18 Nov 2013, 07:44 AM
Hello Ariel,

 All Kendo UI widgets need a HTML element. If you don't want to initialize them from existing one you can dynamically create one and append it in the DOM tree.

$("<input>").appendTo(document.body).kendoDatePicker();

Here is a live demo: http://jsbin.com/UVaJEYo/1/edit

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
VasVas
Top achievements
Rank 1
answered on 18 Nov 2013, 11:03 AM
Dear Atanas,
Thank  you so much for your quick replay.
This is exactly what I needed. 

Yours,

Ariel
Tags
General Discussions
Asked by
VasVas
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
VasVas
Top achievements
Rank 1
Share this question
or