http://localhost:49176/#TabStrip-2
For third tab:
http://localhost:49176/#TabStrip-3
Please not that I have not added any controller for tabsstrip as shown in example project.
13 Answers, 1 is accepted
I am not sure where exactly could be the problem. Please review this online demo.
Also please verify that you have added ScriptRegistrar control on the master/view page.
For further information review this online help article:
http://www.telerik.com/help/aspnet-mvc/getting-started-using-telerik-extensions-for-asp.net-mvc-in-your-project.html
Sincerely yours,
Georgi Krustev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Even I am having the same exact problem and I have started using telerik mvc2 application so the first steps are done.
Kindly help.
Regards,
Hilda Fabiola Bernard
In order to proceed with our investigation I will ask you to send us a simple test project which reproduces the depicted issue.
Thus I will be able to observe the erroneous behavior and advice you further.
Georgi Krustev
the Telerik team
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of test.test.testModel)" %>
<% If Model isnot Nothing Then %>
<% Dim tabBuilder As Telerik.Web.Mvc.UI.TabStripBuilder = Html.Telerik().TabStrip()
tabBuilder.Name("MultiTabBuilder")
tabBuilder.Items( Function(tbs) tbs.Add().Text("Tab1").Content(Sub()
%>
<% Html.RenderPartial("Jobs", New Model(Model.Id))%>
<% End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text(" Add Reviews").Content(Sub()
%>
<% Html.RenderPartial("Comments", New Model2(Model2.id))%>
<% End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("History").Content(Sub()
%>
Test1
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("Status").Content(Sub()
%>
test2
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("Details").Content(Sub()
%>
test3
<%
End Sub))
tabBuilder.SelectedIndex(0)
tabBuilder.Render()
%>
<% End If %>
Thanks!
Could you please verify that all required JavaScript files are loaded on page. You can check this help topic for more information.
Georgi Krustev
the Telerik team
| TabStrip |
|
jquery-1.4.2.min.js is loaded instead of jquery-1.4.4.min.js ,rest two are same.
You will need to upgrade jquery to version 1.4.4. teleriktabstring.js file uses delegate method which is not supported in jquery.1.4.2.js. This is the reason why tabstrip UI component is not working.
Georgi Krustev
the Telerik team
We also did a simple test by adding tab control inside view(aspx), this is not allowing to switch tabs too(code is shown below).
Now we have 2 problems
1. Unable to switch tab in view i.e aspx page(code shown below)
2.We need to know that which files need to be included in usercontrol (ascx page) having tabcontrol. We have attempted to include scriptregistrar in partial view.I guess that both problems maybe fixed on fixing first one, still it would be nice to know exactly what needs to be included in user control.
Thanks !
<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
TestTab
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>TestTab</h2>
<% Dim tabBuilder As Telerik.Web.Mvc.UI.TabStripBuilder = Html.Telerik().TabStrip()
tabBuilder.Name("MultiTabBuilder")
tabBuilder.Items(
Function(tbs) tbs.Add().Text("tab1") _
.Content(Sub()
%>
tab1
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("tab2") _
.Content(Sub()
%>
tab2
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("tab3") _
.Content(Sub()
%>
tab3
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("tab4") _
.Content(Sub()
%>
tab4
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("tab5") _
.Content(Sub()
%>
tab5
<%
End Sub))
tabBuilder.Items(Function(tbs) tbs.Add().Text("tab6") _
.Content(Sub()
%>
tab6
<%
End Sub))
tabBuilder.SelectedIndex(0)
tabBuilder.Render()
%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftTitleButtonContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="RightTitleButtonContent" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="pageEndScripts" runat="server">
</asp:Content>
Here is a link to the help topic which shows required JavaScript files for each component.
If the PartialView is loaded with Ajax then you need to include required JavaScript files by your own.
I have attached a simple test which shows how to implement different cases.
Georgi Krustev
the Telerik team
Thanks for Sample code!
Your sample project is not compatible with Visual Studio 2010,so I could not run & test it, but I have gone through the design elements and created similar project & its working in the sample scenario.
Our application has different scenario
We have some folders for different sets of views, in one folder, its index view is calling an ascx control through renderaction , before returning the partial view it prepares a list of records to be passed to this partial view. This partial view shows the records against each person record in format to show it as a part of that person record.
Till now we have navigated :- Main Page- Folder4-Index-partialView1.
In this partialView1, on click of an icon in any record, it opens a telerik window with Tabs.
Window is defined in partialView1, by calling onClick event through html link(a href) following function is called
Definiton of window is followed by
Window.contenturl=’<%: Url.Action(“MultiTab",”Multi”) %> +’?myid=’+e; %>
Then center,refresh & open it.
“MultiTab” is the partial view having tabstrip control and “multi” controller is returning this partialview along with some model properties
Now our navigation stage is
Main Page- Folder4-Index-partialView1-PartialView2
PartialView2 is shown inside Telerik window ,It has multiple tabs,each tab calls different partialview.
Everything works well,
All models view & tabs are populated with information, only the switch is not happening
I have included script registrar in index and partialview1 as suggested.
It is strange that the demo could not be opened on VS2010. Here is a screencast which I take in my attempt to reopen it locally.
Because of the mentioned inability to open and modify the attached project, I will ask you to send us a simple test project which reproduce the depicted issue. Thus I will be able to observe the strange behavior locally and advice you further.
Georgi Krustev
the Telerik team