This is a migrated thread and some comments may be shown as answers.

Panelbar migration

4 Answers 64 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 05 Oct 2009, 02:49 PM
Hi,

I try to migrate http://www.pp-p,com to .NET 3.5
Selected pages are white.
If you (for an example) expand Team - Allgemeins/Home stays selected.

The problem PanelBar changed the select behaviour.
With the old version (as you can see) a user can expand other nodes - the current page is still selected.

I'm not able to get this working with Q2 2009 - as soon as I expand another item (without selecting a detail entry),
the selection of the current page gets lost.

How can I achieve the "old" behaviour with the current version of PanelBar?

Regards
Manfred

4 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 05 Oct 2009, 03:19 PM
Hi ManniAT,

Please find attached a sample web application that shows the needed approach.

All the best,
Paul
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.
0
ManniAT
Top achievements
Rank 2
answered on 05 Oct 2009, 03:35 PM
Hi Paul,

first of all thank you for the extreme fast response!!!

It looks exactly like the thing I need.
BUT - I use a Sitemap datasource not static items.
As you see - when you open the following link the corresponding item is selected in the panel bar
http://www.pp-p.com/Partner/Microsoft.aspx

I set up a testpage using a masterpage - like this:
Snippet created with CBEnhancer
<asp:SiteMapDataSource ID="dsSMDE" runat="server" ShowStartingNode="false" SiteMapProvider="smpDE" />
<asp:SiteMapDataSource ID="dsSMEN" runat="server" ShowStartingNode="false" SiteMapProvider="smpEN" />
<div id="Wrapper">
    <div id="TopTab">
    <div id="LNGSelect">
        <asp:RadioButtonList ID="rbLanguageSelect" runat="server" AutoPostBack="True" onselectedindexchanged="rbLanguageSelect_SelectedIndexChanged" RepeatDirection="Vertical" RepeatLayout="Flow">
        <asp:ListItem Text="Deutsch" Value="DE" />
        <asp:ListItem Text="English" Value="EN" />
        </asp:RadioButtonList>
    </div>
    </div>
    <div id="InnerTab">
        <div id="LeftTab">
            <telerik:RadPanelBar Width="150px" ID="rpbPanel" Runat="server" Skin="Office2007" DataSourceID="dsSMDE" >
            </telerik:RadPanelBar>
        </div>
Here a sample sitemap:
Snippet created with CBEnhancer
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="" title="Other"  description="Root holder">
    <siteMapNode url="" title="Allgemeines"  description="General things">
        <siteMapNode url="/Default.aspx" title="Home"  description="PPP Com Start" />
        <siteMapNode url="/Test.aspx" title="Test"  description="" />
    </siteMapNode>
    <siteMapNode url="" title="Other"  description="General things">
        <siteMapNode url="/Default.aspx?ID=11" title="Home"  description="PPP Com Start" />
        <siteMapNode url="/Test.aspx?aa=1" title="Test"  description="" />
    </siteMapNode>
    </siteMapNode>
</siteMap>
The problems:
a.) I can't use Security trimming (since I have empty URLs)
b.) It does select "Group headers"

I also tried with an XML File like this:
Snippet created with CBEnhancer
<?xml version="1.0" encoding="utf-8" ?>
<PanelBar>
  <Item ID="Panel1" Text="Allgemeines" Expanded="true">
    <Item ID="Startseite" Text="Home" NavigateUrl="/Default.aspx" Selected="true" />
  </Item>
  <Item ID="Das Unternehmen" Text="Das Unternehmen">
    <Item ID="PPPCom Geschichte" Text="Geschichte" NavigateUrl="/Unternehmen/Geschichte.aspx" />
    <Item ID="PPPCom Grundsätze" Text="Grundsätze" NavigateUrl="/Unternehmen/Grundsaetze.aspx" />
    <Item ID="PPPCom Mitarbeiter" Text="Mitarbeiter" NavigateUrl="/Unternehmen/Mitarbeiter.aspx" />
  </Item>
  <Item ID="Unser Team" Text="Unser Team">
    <Item ID="PPPCom Manfred" Text="Manfred" NavigateUrl="/Team/Manfred.aspx" />
But the same behaviour - as soon as I select a "Group Header" page get's deselected.

Regards
Manfred
0
Accepted
Paul
Telerik team
answered on 06 Oct 2009, 07:23 AM
Hi ManniAT,

I think you can easily achieve your goal by moving the code from Page_Load event to panelbar's PreRender event. Please find attached a sample page that shows the needed approach.

If that doesn't help,  I think it will be best if you can open a support ticket and send us a simple running project (incl. CSS, images, skins, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Regards,
Paul
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.
0
ManniAT
Top achievements
Rank 2
answered on 06 Oct 2009, 07:54 AM
Hi Paul,

the second sample did the trick.
Now I only have to play around a bit with CSS to avoid the group header to become orange - and I have exactly what I need.

Thanks a lot
Manfred
Tags
PanelBar
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Paul
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or