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

Binding tabs with MVVM

1 Answer 283 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 08 Sep 2014, 03:25 PM
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>

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 10 Sep 2014, 09:12 AM
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!
 
Tags
TabStrip
Asked by
Steven
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or