This is a migrated thread and some comments may be shown as answers.
dynamic tab creation
1 Answer 33 Views
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 Brenchley
Top achievements
Rank 1
David Brenchley asked on 14 Mar 2012, 10:17 PM
I'm really a noob at MVC and this is probably more of a general MVC question.
I have a menu that displays from the _ViewStart.cshtml on all pages.  I have a Product view that displays multiple ProductDetails for a selected Product in a tabstrip control.
I have the tabstrip control modeled after your Dynamic tab demo.
The contentUrl is populated with values such as http://localhost:62135/ProductDetail/Edit/1
My problem is, when the page displays, another _ViewStart menu displays below the displayed tabs.  How do I get rid of that secondary menu, or how do I get the _ViewStart to not populated these ProductDetail sub-pages?
@{ Html.Telerik().TabStrip()             
        .Name("TabStrip")             
        .Effects(fx => fx.Expand()                 
        .Opacity()                 
        .OpenDuration(200)                 
        .CloseDuration(300)
            )                         
             .BindTo((List<CmsWeb.Models.NavigationData>)ViewData["tabStripData"],
                (item, navData) => {
                        item.Text = navData.Text;
                       item.ContentUrl = navData.NavigateUrl;
                 })
            .SelectedIndex(0)
            .Render(); }

1 Answer, 1 is accepted

Sort by
0
David Brenchley
Top achievements
Rank 1
answered on 15 Mar 2012, 06:27 PM
I figured it out.
Instead of having my Action passing a View, I have it pass a PartialView

public ActionResult CreateChild(int id, int languageId) {

 

 

 

//initialize new product detail

 

ProductDetail productdetail = new ProductDetail();

productdetail.ProductId = id;

productdetail.LanguageId = languageId;

 

return PartialView(productdetail);

}

Tags
General Discussions
Asked by
David Brenchley
Top achievements
Rank 1
Answers by
David Brenchley
Top achievements
Rank 1
Share this question
or