New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Persisting PanelBar Settings

  • Mail
    • Personal Folders
    • Deleted Items
    • Inbox
    • My Mail
    • Sent Items
    • Outbox
    • Search Folders
  • Contacts
    • My Contacts
    • Address Cards
    • Phone List
    • Shared Contacts
  • Tasks
    • My Tasks
    • Shared Tasks
    • Active Tasks
    • Completed Tasks
  • Notes
    • My Notes
    • Notes List
    • Shared Notes
    • Archive
  • Folders List
    • My Client.Net
    • My Profile
    • My Support Tickets
    • My Licenses

In this example you can see how to preserve the Selected Tab and Selected Item of the PanelBar control using the Telerik ASP.NET Persistence Framework.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • styles.css
<%@ Page Title="" Language="VB"  AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="DefaultVB" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" type="text/css" href="styles.css" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <telerik:RadPersistenceManager runat="server" ID="RadPersistenceManager1">
        <PersistenceSettings>
            <telerik:PersistenceSetting ControlID="RadPanelBar1" />
        </PersistenceSettings>
    </telerik:RadPersistenceManager>
    <div class="demo-container size-narrow">
        <div class="demo-settings">
            <telerik:RadButton RenderMode="Lightweight" ID="SaveButton" runat="server" Text="Save state" OnClick="SaveButton_Click" />
            <telerik:RadButton RenderMode="Lightweight" ID="ResetButton" runat="server" Text="Reset state" OnClick="ResetButton_Click" />
            <telerik:RadButton RenderMode="Lightweight" ID="LoadButton" runat="server" Text="Load state" OnClick="LoadButton_Click" />
        </div>
        <telerik:RadPanelBar RenderMode="Lightweight" runat="server" ID="RadPanelBar1" Width="100%">
            <Items>
                <telerik:RadPanelItem Text="Mail" Expanded="True">
                    <Items>
                        <telerik:RadPanelItem Text="Personal Folders" />
                        <telerik:RadPanelItem Text="Deleted Items" />
                        <telerik:RadPanelItem Text="Inbox" />
                        <telerik:RadPanelItem Text="My Mail" />
                        <telerik:RadPanelItem Text="Sent Items" />
                        <telerik:RadPanelItem Text="Outbox" />
                        <telerik:RadPanelItem Text="Search Folders" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Contacts">
                    <Items>
                        <telerik:RadPanelItem Text="My Contacts" />
                        <telerik:RadPanelItem Text="Address Cards" />
                        <telerik:RadPanelItem Text="Phone List" />
                        <telerik:RadPanelItem Text="Shared Contacts" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Tasks">
                    <Items>
                        <telerik:RadPanelItem Text="My Tasks" />
                        <telerik:RadPanelItem Text="Shared Tasks" />
                        <telerik:RadPanelItem Text="Active Tasks" />
                        <telerik:RadPanelItem Text="Completed Tasks" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Notes">
                    <Items>
                        <telerik:RadPanelItem Text="My Notes" />
                        <telerik:RadPanelItem Text="Notes List" />
                        <telerik:RadPanelItem Text="Shared Notes" />
                        <telerik:RadPanelItem Text="Archive" />
                    </Items>
                </telerik:RadPanelItem>
                <telerik:RadPanelItem Text="Folders List">
                    <Items>
                        <telerik:RadPanelItem Text="My Client.Net" />
                        <telerik:RadPanelItem Text="My Profile" />
                        <telerik:RadPanelItem Text="My Support Tickets" />
                        <telerik:RadPanelItem Text="My Licenses" />
                    </Items>
                </telerik:RadPanelItem>
            </Items>
            <ExpandAnimation Type="None" />
            <CollapseAnimation Type="None" />
        </telerik:RadPanelBar>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance