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

Nested HTML containers binding

2 Answers 41 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Artem
Top achievements
Rank 1
Artem asked on 09 Jul 2013, 03:59 PM
Is there a way in Kendo Framework to handle a situation when some piece of data-bound HTML layout is nested within another data-bound HTML?
Example here.
The goal here is not to decouple nested HTML from it's container without extreme necessity.
What is the recommended approach here?

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 11 Jul 2013, 11:32 AM
Hello Artem,

Thank you for getting in touch with us.
I suggest you to use a more complex selector which will exclude #nested-form container that is already bound to another View-Model.
kendo.bind($('#parent-form').children().not('#nested-form'), parentViewModel);

For your convenience I updated the jsFiddle sample:

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Artem
Top achievements
Rank 1
answered on 11 Jul 2013, 03:57 PM
Works like a charm, thanks!
Tags
MVVM
Asked by
Artem
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Artem
Top achievements
Rank 1
Share this question
or