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

Overview MVVM data-role tags

1 Answer 151 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Berry
Top achievements
Rank 1
Berry asked on 21 Aug 2014, 10:08 AM
Hi,

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!

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Aug 2014, 07:20 AM
Hi,

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" ]'>
 </div>

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

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
MVVM
Asked by
Berry
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or