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.

    Thanks.

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

    Posted 10 Sep 2014 Link to this post

    Hello Steven,

    Please check the following example: http://dojo.telerik.com/OxUna

    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. Kendo UI is VS 2017 Ready
Back to Top