Binding tabs with MVVM

2 posts, 0 answers
  1. Steven
    Steven avatar
    4 posts
    Member since:
    Jul 2014

    Posted 08 Sep 2014 Link to this post

    I'm trying to use the tabstrip control, but would like to use it with binding.

    The following code works, but its definitely not the way i'd like to use the framework.  can you tell me if there's a way to dynamically bind tabs without the inline code?  My optimal code would have something like data-bind="source:tabs" where I can then define which property is the title, and then a template for the body.


    <div data-role="tabstrip">
                # for(var i = 0; i < filter.Tabs.length; i++){ #
                    <li # if(i == 0){# class="k-state-active" #}#>
                        #: filter.Tabs[i].TabLabel #
                # } #
                    <span> Tab 1 </span>
                    <span> Tab 2 </span>
                    <span> Tab 3 </span>
  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 10 Sep 2014 Link to this post

    Hello Steven,

    Please check the following example:

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top