Creating a JS wrapper for kendo ui Web

3 posts, 1 answers
  1. VasVas
    VasVas avatar
    31 posts
    Member since:
    Nov 2012

    Posted 17 Nov 2013 Link to this post

    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. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 18 Nov 2013 Link to this post

    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!
  3. VasVas
    VasVas avatar
    31 posts
    Member since:
    Nov 2012

    Posted 18 Nov 2013 Link to this post

    Dear Atanas,
    Thank  you so much for your quick replay.
    This is exactly what I needed. 

    Yours,

    Ariel
Back to Top