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

Collapse/Expand - Loses selected node

2 Answers 130 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
lewismoten
Top achievements
Rank 2
lewismoten asked on 22 May 2008, 09:39 PM
I am having a bug reported to me about the behavior of our implementation of the Telerik Panel Bar. When the end-user is viewing a page, we have a visual indication to let them know where they are. (text is bold)

The problem comes with the user collapses a parent node, and then expands it again. The style sheet is no longer applied to the original node. I took this down to the bare bones and created a new web solution with nothing else except a panel bar and a Web.Sitemap. I choose a skin "Golden" so that I could tell the difference between a selected and unselected node. The problem was still present.

Is there a way to get the Rad Panel Bar to remember that a node is selected when it contracts/expands?

We are using RadControls for ASP.NET Q3 2007 for the 2.0 framework with RadPanelbar.Net2.dll version 4.3.2.0.


Create a Web.Sitemap
<?xml version="1.0" encoding="utf-8" ?> 
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > 
    <siteMapNode title="Root Node"
        <siteMapNode url="default.aspx" title="Home"  /> 
    </siteMapNode> 
</siteMap> 
Create default page
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="RadPanelbar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <rad:RadPanelbar Skin="Golden" ID="RadPanelbar1" runat="server" DataSourceID="SiteMapDataSource1"
        </rad:RadPanelbar> 
        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" /> 
    
    </div> 
    </form> 
</body> 
</html> 

My test:
  1. Run the application.
  2. Notice "Home" is selected (white underline).
  3. Click "Root Node" to hide "Home".
  4. Click "Root Note" to show "Home".
  5. Notice that "Home" is no longer selected (black no-underline)

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 23 May 2008, 08:36 AM
Hello lewismoten,

This behavior is by design - clicking an item makes it selected and uneselects the previously selected one. If you need the item to remain highlighted you can specify a different CSS class for it via the CssClass server-side property.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
lewismoten
Top achievements
Rank 2
answered on 30 May 2008, 03:30 PM
Ok, I think I have figured it out using your suggestion. Thank you for the help.
Tags
PanelBar
Asked by
lewismoten
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
lewismoten
Top achievements
Rank 2
Share this question
or