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

template for tabstrip content

6 Answers 1022 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
JCSCo
Top achievements
Rank 1
JCSCo asked on 17 Sep 2014, 08:49 PM
I have a remote dataSource with about 20 different values. I have one value being used as the dataTextField for a tabstrip. I would like to use the rest of the values in the content of the tabstrip (perhaps in a template). Is there an example somewhere of this being done? all the documentation I can find shows simple text data with a single value in the content. I need to be able to edit multiple values in the content of the tabstrip. any help is appreciated.

6 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 19 Sep 2014, 01:42 PM
Hi JCSCo,

This behavior is not supported out of the box, however it could be achieved using a custom solution. For example, the TabStrip's select event could be utilized to get the dataItem corresponding to the selected tab and passed to a template. The result could then be used to populate the tab's content, as shown in this example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
JCSCo
Top achievements
Rank 1
answered on 19 Sep 2014, 09:35 PM
Thanks, this looks like it will do the trick.
0
JCSCo
Top achievements
Rank 1
answered on 24 Sep 2014, 03:37 PM
Hi Alexander,

I have successfully created a template using your example as a guideline for static data. However, I have to add some numeric text boxes and drop down lists to the template and I'm not sure how to. All the examples I could find use MVVM and data-attributes, which don't seem to work in this scenario. Is there a way to include numeric textboxes and drop down lists to the template in your example, or would it be better to reconfigure the template to use MVVM. and if so, is there an example available?

Thanks
0
Alexander Popov
Telerik team
answered on 26 Sep 2014, 09:42 AM
Hello again,

Here is an example how you could use the MVVM approach to initialize widget from the template.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
David
Top achievements
Rank 1
answered on 03 Apr 2015, 03:30 PM

Alexander:

How would you force the first tab to show in this example?  Thanks!

0
Alexander Popov
Telerik team
answered on 06 Apr 2015, 10:15 AM
Hello David,

The simplest approach would be to call the select method right after the TabStrip has been initialized. For example: 
$("#tabstrip").kendoTabStrip({
    ...
});
$("#tabstrip").getKendoTabStrip().select(0);

Regards,
Alexander Popov
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
JCSCo
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
JCSCo
Top achievements
Rank 1
David
Top achievements
Rank 1
Share this question
or