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

[Solved] Can you have a Tabstrip inside a Tabstrip ?

3 Answers 135 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.
David
Top achievements
Rank 1
David asked on 15 Dec 2010, 06:21 AM
Can you have a Tabstrip inside a Tabstrip ?

I have tried the following but it doesn't work:

<%
    Html.Telerik().TabStrip()
        .Name("TabStrip")
        .Items(items =>
        {
            items.Add().Text("Item 1")
                 .Content(()=>
                 {%>
                     <p>Content</p>
                 <%});
            items.Add().Text("Item 2")
                .Content(() =>
                {%>
                    <!-- START INNER TABSTRIP -->
                    <%
                        Html.Telerik().TabStrip()
                            .Name("TabStrip2")
                            .Items(subitems =>
                            {
                                items.Add().Text("Item 1")
                                    .Content(()=>
                                    {%>
                                        <p>Content</p>
                                    <%});
                                items.Add().Text("Item 2")
                                    .Content(()=>
                                                 {%>
                                                     <p>Content</p>
                                                 <%});
                            })
                            .Render();
                    %>
                    <!-- END INNER TABSTRIP -->
                <%});
        })
        .Render();
%>


Actually it renders like so:

<div class="t-widget t-tabstrip t-header" id="TabStrip"><ul class="t-reset t-tabstrip-items"><li class="t-item t-state-default"><a class="t-link" href="#TabStrip-1">Item 1</a></li><li class="t-item t-state-default"><a class="t-link" href="#TabStrip-2">Item 2</a></li></ul><div class="t-content" id="TabStrip-1">
 
                     <p>Content</p>
 
                 </div><div class="t-content" id="TabStrip-2">
 
                Here
 
                    <br />
 
                    <!-- START INNER TABSTRIP -->
 
                     
 
                    <!-- END INNER TABSTRIP -->
 
                    <br />
 
                    Here
 
                </div></div>
 
    </div>

You can see no generated html for where the inner TabStrip was

Just wondering if its possible otherwise I will go different path.

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Dec 2010, 08:17 AM
Hello David,

 Try this:

<% Html.Telerik().TabStrip()
       .Name("TabStrip")
       .Items(items =>
       {
            items.Add().Text("Item 1").Content(() =>
            {
                %>
                 <p>
                     Content</p>
                 <%
            });
            items.Add().Text("Item 2").Content(() =>
            {
                 Html.Telerik().TabStrip()
                     .Name("TabStrip2")
                     .Items(subitems =>
                     {
                         subitems.Add().Text("Item 1").Content(() =>
                         {
                             %>
                                <p>Content</p>
                             <%
                         });
 
                         subitems.Add().Text("Item 2").Content(() =>
                         {
                             %>
                                <p>Content</p>
                             <%
                         });
                     })
                     .Render();
            });
       })
       .Render();
 %>

Greetings,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Joseph Castillo
Top achievements
Rank 1
answered on 04 Apr 2013, 08:36 PM
I am trying something similar but it gets stuck.

Any ideas?

@(Html.Telerik().TabStrip()
        .Name("AppsTabstrip")
        .Items(apps =>
                {
                    apps.Add()
                        .ContentHtmlAttributes(new {style = "width:515px; height:350px"})
                        .Visible(true)
                        .Text("ECM")
                        .Content(() =>
                                    Html.Telerik().TabStrip()
                                        .Name("EcmRelated")
                                        .Items(ecmTabs =>
                                                {
                                                    ecmTabs.Add()
                                                            .ContentHtmlAttributes(new {style = "width:515px; height:350px; overflow:auto;"})
                                                            .Text("Sites/Areas/Roles")
                                                            .Content("Some text here");
 
                                                    ecmTabs.Add().Text("Jobs and Rates")
                                                            .ContentHtmlAttributes(new {style = "width:515px; height:  350px"})
                                                            .Visible(ECM.DAL.Infrastructure.Managers.RightsManager.IsAccountAdmin())
                                                            .Content("Some more text");
                                                }));
 
                    apps.Add()
                        .ContentHtmlAttributes(new {style = "width:515px; height:350px"})
                        .Visible(true)
                        .Text("BackOffice")
                        .Content("");
                }))


0
Daniel
Telerik team
answered on 09 Apr 2013, 03:49 PM
Hello,

I attached a sample project that demonstrates the possible solutions in order to use a nested a TabStrip. Let me know if the problem occurs in the sample project on your side.

Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
TabStrip
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Joseph Castillo
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or