Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > dynamic tab creation

Not answered dynamic tab creation

Feed from this thread
  • Posted on Mar 14, 2012 (permalink)

    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(); }

    Reply

  • Posted on Mar 15, 2012 (permalink)

    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);

    }

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > dynamic tab creation