Overview MVVM data-role tags

2 posts, 0 answers
  1. Berry
    Berry avatar
    2 posts
    Member since:
    May 2014

    Posted 21 Aug 2014 Link to this post


    After a few hours of searching the interwebs I'm forced to ask it here in the hope someone points me to a very obvious page that explains it all. Is there an overview of all possible values (ui elements) that can be initialized with mvvm via the data-role attribute? 

    For now I could find the ui-elements that I needed in the demo's/docs but now I run into a needed component that I cannot find. If an ui-element has no mvvm bindings (or is not translated for this construction) is it possible to create it myself?

    I want to use the "colorpalette" inside the mvvm model and eventually pass my own palette to it.

    Thanks in advance!
  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 25 Aug 2014 Link to this post


    You can initialize any Kendo UI widget via MVVM and data-role. The role is the name of the widget in lowercase e.g. "colorpalette":

     <div data-role="colorpalette"
             data-palette='[ "#ddd1c3", "#d2d2d2", "#746153", "#3a4c8b", "#ffcc33", "#fb455f", "#ac120f" ]'>

    Here is a demo showing how to initialize the ColorPalette from MVVM: http://dojo.telerik.com/AHucu

    Atanas Korchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top