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

[Solved] Tabstrip with Treeview

1 Answer 114 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jeroen Eikmans
Top achievements
Rank 1
Jeroen Eikmans asked on 29 Aug 2011, 09:48 AM
Hello,

I have an application that had a Tabstrip with 3 tabs on it, each Tab has a Treeview.
If i set the SelectedIndex of the Tabstrip in the cshtml to 0, only the Treeview on the first tab is working.
When I select the second (or third) tab the Treeview on that tab can not be expanded and doesn't have hovering style applied.

When is set the SelectedIndex of the Tabstrip in the cshtml to 1 only the Treeviews on the first and second Tab are working.
When is set the SelectedIndex of the Tabstrip in the cshtml to 2 all Treeviews are working.

Is there something i am doing wrong? I attached a TestApp to demo the problem.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 29 Aug 2011, 12:44 PM
Hello Roel,

Thanks for the sample project.

All TreeViews on the page have the same ID (Name), which is not correct. Each TreeView in each Tab should have a unique Name. Doing this is easy, since you have different action methods for each Tab in the controller. For example, you can add some additional property to TestModel, then set its value in the action method and append it to the TreeView Name string. Note that this will require modifications in the OnSelect function name and function body. Actually, it is better to move the scripts outside the Details view, so that they are not rendered multiple times on the page, which also causes the functions to be redefined.

Best wishes,
Dimo
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TabStrip
Asked by
Jeroen Eikmans
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or