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

Trouble w/ Layout binding

3 Answers 66 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Reagan
Top achievements
Rank 1
Reagan asked on 09 Jan 2014, 09:24 PM
I'm very new to MVVM and also to Kendo. I was trying to use the SPA examples to build something I already had working another way. The SPA "Getting Started" examples use the concept of Layouts and Views together which looks useful. Here's what I'm trying to do: 

Iterate over a simple JSON array in my viewmodel to emit a bound list of checkboxes. I originally got it working using the kendo.template() method and then setting the HTML results of that to the .html() of my target div. That works fine. But if I try and do this using a Layout and a View, (using layout.showIn() method) it just spits out my template tags and doesn't actually do anything. Here's a JSFiddle showing this:

http://jsfiddle.net/6Nsx8/1/

Any input is appreciated. 

Thanks,
Reagan

PS: I  have the sushi source code up for reference and I'm pretty sure I'm doing things right, but I can't be sure. 

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 13 Jan 2014, 08:45 AM
Hi Reagan,

The SPA View/Layout rely on MVV bindings to display data - template expressions are not supported. Please check an updated version of your example

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Reagan
Top achievements
Rank 1
answered on 13 Jan 2014, 09:15 PM
Thank you so much for your help! I knew I had to be missing something huge, and that was it. Thanks again!!
0
Robert
Top achievements
Rank 2
answered on 23 Feb 2017, 09:35 PM
You can bind to the header in the layout: http://dojo.telerik.com/uHABu 
Tags
MVVM
Asked by
Reagan
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Reagan
Top achievements
Rank 1
Robert
Top achievements
Rank 2
Share this question
or