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

[Solved] Tab Headers Links not working

1 Answer 8 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.
Mike
Top achievements
Rank 1
Mike asked on 22 May 2013, 11:50 AM
Hi I am new to both Telerik controls and the Razor Interface (apologies if this is an obvious answer)

I am trying to add a Telerik Tab Strip to a page however the header strips do not navigate to different tabs - it is stuck on the first tab (which is displaying correctly). It will not let me navigate to the second tab no matter what I do. 

 I have been stuck on this for a good few days now, any assistance will be fantastic.

I have added the control to my page as follows:


@Html.Partial(
"_TestTabbed", Model)

@(Html.Telerik().StyleSheetRegistrar()

     .DefaultGroup(group => group

     .Add("telerik.common.min.css")

     .Add("telerik.vista.min.css")

     .Add("telerik.rtl.min.css")


Then within the file _TestTabbed.cshtml:

@Html.Telerik().TabStrip().Name("productinfo").Items(x =>

{

TabStripItemBuilder tabInfo = null;

tabInfo = x.Add().Text("Product Info").Content(ProductInfo().ToHtmlString());

TabStripItemBuilder tabDocuments = null;

tabDocuments = x.Add().Text("Product Documents").Content(ProductDocuments().ToHtmlString());

var selectedTab = (string)ViewData["selectedTab"];

switch (selectedTab)

{

case "Product Info":

tabInfo.Selected(true);

break;

case "Product Documents":

tabDocuments.Selected(true);

break;

default:

tabInfo.Selected(true);

break;

}

EngineContext.Current.Resolve<IEventPublisher>().Publish(new AdminTabStripCreated(x, "productinfo"));

})

@helper ProductInfo()

{

@Html.Action("ProductSpecifications", "Catalog", new { productId = Model.Id })

}

@helper ProductDocuments()

{

@Html.Action("ProductTags", "Catalog", new { productId = Model.Id })

}

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 23 May 2013, 10:54 AM
Ive sorted it.

I required following code underneath my declaration:

@(Html.Telerik().ScriptRegistrar().DefaultGroup(asset => asset.DefaultPath("~/Scripts/2013.1.219")

.Add("jquery-1.7.1.min.js")

))

Tags
TabStrip
Asked by
Mike
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or