Hi all,
I'm having some problems getting the load on demand style of RadTabStrips working. When I hit the page the first tab loads as expected, but then when I click any of the other tabs I get the loading panel's animation and the following JavaScript error:
Error: $telerik.$ is not a function
Source File: http://localhost:54085/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.3.1103.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a4552b812-caf7-4129-9b53-8f199b5bce6c%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d
Line: 2679
The TabClick event handler in my code behind never gets hit.
The aspx code is:
and the code behind is:
Any thoughts or pointers would be very much appreciated!
I'm having some problems getting the load on demand style of RadTabStrips working. When I hit the page the first tab loads as expected, but then when I click any of the other tabs I get the loading panel's animation and the following JavaScript error:
Error: $telerik.$ is not a function
Source File: http://localhost:54085/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.3.1103.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a4552b812-caf7-4129-9b53-8f199b5bce6c%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d
Line: 2679
The TabClick event handler in my code behind never gets hit.
The aspx code is:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ContactTestingLod.aspx.vb" |
Inherits="Eclipse3.ContactTestingLod" %> |
<%@ Register Src="ContactDetails.ascx" TagName="ContactDetails" TagPrefix="uc1" %> |
<%@ Register Src="ContactSupervisorDetails.ascx" TagName="ContactSupervisorDetails" |
TagPrefix="uc2" %> |
<%@ Register Src="ContactUserDetails.ascx" TagName="ContactUserDetails" TagPrefix="uc3" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title></title> |
</head> |
<body> |
<form runat="server" id="mainForm" method="post"> |
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> |
<telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" /> |
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadTabStrip1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> |
<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="RadMultiPage1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
<script type="text/javascript"> |
function onTabSelecting(sender, args) { |
if (args.get_tab().get_pageViewID()) { |
args.get_tab().set_postBack(false); |
} |
} |
</script> |
<telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="0" |
runat="server" MultiPageID="RadMultiPage1" /> |
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" /> |
</form> |
</body> |
</html> |
and the code behind is:
Imports Telerik.Web.UI |
Partial Public Class ContactTestingLod |
Inherits System.Web.UI.Page |
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
If Not Page.IsPostBack Then |
AddTab("Contact Details", "ContactDetails") |
AddPageView(RadTabStrip1.FindTabByValue("ContactDetails")) |
AddTab("Supervisor Details", "ContactSupervisorDetails") |
AddTab("User Details", "ContactUserDetails") |
End If |
End Sub |
Private Sub AddTab(ByVal tabName As String, ByVal tabValue As String) |
Dim tab As RadTab = New RadTab |
tab.Text = tabName |
tab.Value = tabValue |
RadTabStrip1.Tabs.Add(tab) |
End Sub |
Private Sub AddPageView(ByVal tab As RadTab) |
Dim pageView As RadPageView = New RadPageView |
pageView.ID = tab.Value |
RadMultiPage1.PageViews.Add(pageView) |
tab.PageViewID = pageView.ID |
End Sub |
Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated |
Dim userControlName As String = e.PageView.ID & ".ascx" |
Dim userControl As Control = Page.LoadControl(userControlName) |
userControl.ID = e.PageView.ID & "_userControl" |
e.PageView.Controls.Add(userControl) |
End Sub |
Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick |
AddPageView(e.Tab) |
e.Tab.PageView.Selected = True |
End Sub |
End Class |
Any thoughts or pointers would be very much appreciated!