This question is locked. New answers and comments are not allowed.
I am trying to load a partial view which has a tabstrip. I am making a jQuery ajax call to the controller which returns a partial view which contains the tab strip. I believe all the Telerik JS is being loaded properly.
Here are pieces of the partial view:
The problem is that <div> has the same content no matter what. Its always the last item from Model.Section. The tab text is is outputted correctly though.
I've tried replacing the foo.bar.ToString with a counter that get incremented at each iteration, but the tabs end up all having the same value, the last counter value.
What am I missing?
Here are pieces of the partial view:
<% Html.Telerik().TabStrip()
.Name("TabStrip")
.Items(tabstrip =>
{
foreach (FooType foo in Model.Section) {
tabstrip.Add()
.Text(foo.Name.ToString())
.Content(() =>
{%>
<
div
><%= foo.bar.ToString() %></
div
>
<%});
}
})
.SelectedIndex(0)
.Render();
%>
The problem is that <div> has the same content no matter what. Its always the last item from Model.Section. The tab text is is outputted correctly though.
I've tried replacing the foo.bar.ToString with a counter that get incremented at each iteration, but the tabs end up all having the same value, the last counter value.
What am I missing?