Control data-bind inside a template rendered after bind

4 posts, 0 answers
  1. rlapao
    rlapao avatar
    23 posts
    Member since:
    Oct 2006

    Posted 15 May 2012 Link to this post

    Hi,

    Is it possible to render a template after the bind action?

    I've created a sample jsFiddle here: http://jsfiddle.net/fnH58/1/ 

    Thanks,
    Ricardo
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 18 May 2012 Link to this post

    Hi Racardo,

    I am not sure if I understand your scenario correctly. Could you please provide more details about the logic you are trying to implement?

     

    Greetings,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. rlapao
    rlapao avatar
    23 posts
    Member since:
    Oct 2006

    Posted 18 May 2012 Link to this post

    Hi Iliana,

    What I was trying to do was to render a template that have a data-bind properties on a page after the initial bind of my page-viewmodel.

    For instance, you have a listview where you show some data, and on-click you want to show some details that are rendered from a different template.

    In my example the details template correspond to:
    <span data-bind="text: test">123</span>
    which have a data-bind property.

    However, the "test" value isn't bound.

    Sorry, if i'm not being clearer :p and thanks for your reply.
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 23 May 2012 Link to this post

    Hello Ricardo,

    The recommended approach for your scenario is to replace the initial template with another one. For example, you could modify template2 to display the main and the detailed information together. Then in the change event just replace the initial template with template2.

    For convenience I updated your jsFiddle example.I hope this helps.

     

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready