Nested HTML containers binding

3 posts, 1 answers
  1. Artem
    Artem avatar
    11 posts
    Member since:
    Jan 2013

    Posted 09 Jul 2013 Link to this post

    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. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2895 posts

    Posted 11 Jul 2013 Link to this post

    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!
  3. Artem
    Artem avatar
    11 posts
    Member since:
    Jan 2013

    Posted 11 Jul 2013 Link to this post

    Works like a charm, thanks!
Back to Top