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

Way to have panel bar fully expanded by default?

4 Answers 156 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Kev
Top achievements
Rank 1
Kev asked on 11 Dec 2008, 09:18 PM
I dont like the look of the collapsed panel bar I would rather just have the panel bar fully expanded by default with no ability to collapse expand is there a way to do this or is there another control that can give me this functionality ??

thanks
Here is my code

Waiting for your reply please hurry!



 

<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="ID"

 

 

DataFieldParentID="ParentID" DataNavigateUrlField="URL"

 

 

DataSourceID="SqlDataSource1" DataTextField="Item" PersistStateInCookie="True"

 

 

Skin="Black" Font-Names="Agency FB">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Expanded="True" Selected="True" >

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<CollapseAnimation Type="None" Duration="100"></CollapseAnimation>

 

 

 

<ExpandAnimation Type="None" Duration="100"></ExpandAnimation>

 

 

</telerik:RadPanelBar>

 

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Dec 2008, 09:22 AM
Hello Kev,

You can set the PreventCollapse property of your panel items to true and their Expanded property to true. If you are using declarative databinding you should do that in the DataBound event of the panelbar.

foreach (RadPanelItem item in RadPanelBar1.Items)
{
      item.PreventCollapse = true;
      item.Expanded = true;
}

Kind regards,
Albert
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kev
Top achievements
Rank 1
answered on 12 Dec 2008, 06:37 PM
Cool Thanks if worked first try!
0
Jimmie
Top achievements
Rank 2
answered on 26 Feb 2009, 09:32 PM
This solution works great. However, the collapse image still shows up on the panels (Q1 2009 Beta Vista skin). 

Currently I use this css to remove the image:
.RadPanelBar_Vista .rpExpandable .rpText, .RadPanelBar_Vista .rpExpanded .rpText {
  background-image: none!important;
}

Would it be possible to only add the collapse image to the panel only if PreventCollapse is false?
0
Paul
Telerik team
answered on 27 Feb 2009, 12:34 PM
Thanks for the suggestion, Jimmie.

Your request goes to our ToDo list for future consideration.

Best wishes,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
PanelBar
Asked by
Kev
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Kev
Top achievements
Rank 1
Jimmie
Top achievements
Rank 2
Paul
Telerik team
Share this question
or