
Is there a way to use multipage with the panelbar control. I want to utilize similar functionality as in the "Defining the RadMultiPage structure in the code-behind" example in the online help for the tabstrip control. The panelbar doesn't have integration with multipage as does the tabstrip so I am not sure the same functionality can be accomplished. I would like to load a custom user control in the page view upon clicking a particular item or subitem on the panelbar. This is the code I am using for the tabstrip. I would like to have the same functionality using the panelbar.
Imports
Telerik.Web.UI
Partial
Class inventory_4
Inherits System.Web.UI.Page
Private Function ReplaceSpaces(ByVal RepString As String)
ReplaceSpaces = RepString.Replace(
" ", "_")
ReplaceSpaces = ReplaceSpaces.ToString
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
AddTab(
"Store")
AddTab(
"Marketplaces")
AddTab(
"Shopping Feeds")
End If
End Sub
Private Sub AddTab(ByVal tabName As String)
Dim tab As New RadTab()
tab.Text = (tabName)
RadTabStrip1.Tabs.Add(tab)
Dim pageView As New RadPageView()
pageView.ID = tabName
RadMultiPage1.PageViews.Add(pageView)
End Sub
Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As Object, ByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated
Dim FunctionPage As String
FunctionPage =
"inventory_"
Dim userControlName As String = FunctionPage & ReplaceSpaces(e.PageView.ID) & ".ascx"
Dim userControl As Control = Page.LoadControl(userControlName)
userControl.ID = ReplaceSpaces(e.PageView.ID) &
"_userControl"
e.PageView.Controls.Add(userControl)
End Sub
Thank you in advance.
DMY
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="TabStripCategories"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="TabStripCategories"></telerik:AjaxUpdatedControl> |
| <telerik:AjaxUpdatedControl ControlID="MultiPageTabs" LoadingPanelID="RadAjaxItemLoadingPanel"></telerik:AjaxUpdatedControl> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadGridVariations"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGridVariations" LoadingPanelID="VariationsLoadingPanel"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </telerik:RadAjaxManager> |
So, I've seen a number of posts related to this and all of them seemed to be related to control blocks added to JS inside of controls...but, that's not my problem. For whatever reason, control blocks in unrelated non-server-side div tags seem to be causing the same error. See the code below. If I remove the <div> tags with the resource pulls, it works. If I remove the RadAjaxManager or if I switch the string drops into Literals, the error goes away. What's up with that? Those divs aren't being run at the server side so they shouldn't be included as controls.
This is with your 2008 AJAX grid control running on .Net 3.5 SP1, VS 2k5 using the built-in dev server.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="imATHLETE.account.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="whatever" runat="server">
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
</telerik:RadStyleSheetManager>
<asp:SqlDataSource ID="imATHLETEDBNet" runat="server" ConnectionString="<%$ ConnectionStrings:imATHLETEDBNet %>"
SelectCommand="usp_get_EventParticipantList" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="inEventID" QueryStringField="fEventDisplayID"
Type="Int32" />
<asp:Parameter Name="inUserID" Type="Int32" DefaultValue="1043" />
<asp:Parameter DefaultValue="0" Name="inFormatXML" Type="Int16" />
</SelectParameters>
</asp:SqlDataSource>
<div class="PageHeader">
<%=Resources.Strings_EN_US.RDPartiDetailsPageTitle %>
<span style="color: #CCCCCC;"> > <%=Resources.Strings_EN_US.RDPartiDetailsPageTitle2 %></span>
</div>
<div id="ParticipantDetails_EventSelect">
<h3><%=Resources.Strings_EN_US.RDPartiDetailsSelectEvent %></h3>
<select name="fEventDisplayID" id="fEventDisplayID">
</select>
</div>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" DataSourceID="imATHLETEDBNet" GridLines="None" Skin="Outlook" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True">
<HeaderContextMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" DataSourceID="imATHLETEDBNet">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="XML_F52E2B61-18A1-11d1-B105-00805F49916B" HeaderText="XML_F52E2B61-18A1-11d1-B105-00805F49916B"
ReadOnly="True" SortExpression="XML_F52E2B61-18A1-11d1-B105-00805F49916B" UniqueName="XML_F52E2B61-18A1-11d1-B105-00805F49916B">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
<Selecting AllowRowSelect="True" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
</ClientSettings>
<FilterMenu EnableTheming="True" Skin="Outlook">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGrid1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
</form>
</body>
</html>

