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

RadPanelBar - Not showing collapse icon

4 Answers 146 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Vijaianand
Top achievements
Rank 1
Vijaianand asked on 06 Oct 2011, 05:02 PM
Hi

I have radpanelbar inside RadSlidingPanel. I have 2 RadPanelItem which has Itemtemplate. I want both to show as collapsed but both showing expanded when control loads. I tried ExpandMode as per demo but still no collapsible icon showing up for any radpanel item. 

<telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" Width="300px" Title="Add Filters"
                MinWidth="225">
                <telerik:RadPanelBar runat="server" ExpandMode="FullExpandedItem" Width="100%" Height="150">
                    <Items>
                        <telerik:RadPanelItem runat="server" Text="Filter By">
                            <ItemTemplate>
                          </ItemTemplate>
                        </telerik:RadPanelItem>
                        <telerik:RadPanelItem runat="server" Text="Filter By SQL Criteria">
                            <ItemTemplate>
                         </ItemTemplate>
                        </telerik:RadPanelItem>
                   </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>
            </telerik:RadSlidingPane>

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Oct 2011, 11:11 AM
Hello Vijaianand,

By using ItemTemplate,the content appears in the panel item immediately below its text. The item cannot be collapsed nor expanded. If the item does not have any text, then the contents of the Item Template become the item itself. You can use ContentTemplate instead and also set Height to the PanelBar to make this work.
For further information check the following help documentation.
Templates Overview

Thanks,
Princy.
0
Vijaianand
Top achievements
Rank 1
answered on 11 Oct 2011, 07:07 PM
That worked. THanks. 
0
Shouvik
Top achievements
Rank 1
answered on 02 Dec 2013, 04:15 PM

Hi Telerik team,
I am using Telerik version 2013.1.220.40.
I am unable to view the Collapse image of the RadPanelbar.
I am trying to dynamically add a RadGrid in a RadPanelbar(created at runtime as well).
Please see the below code for more clarification:

Dim radPanelBarForGrids As New RadPanelBar()
Dim panelItem As RadPanelItem = New RadPanelItem()
panelItem.Text = drv("trcNum")
panelItem.Expanded = True
Dim panelForItems As New Panel() 'Created a new panel
panelForItems.Controls.Add(escrowGrid) 'Added the grid in the panel
panelItem.Controls.Add(panelForItems) 'Added the panel in RadPanelItem
radPanelBarForGrids.ExpandMode = PanelBarExpandMode.FullExpandedItem
radPanelBarForGrids.Width = Unit.Percentage(100)
radPanelBarForGrids.Items.Add(panelItem) 'Added the RadPanelItem in RadPanelBar
phMultiGrids.Controls.Add(radPanelBarForGrids) ' Added the RadPanelBar in a PlaceHolder

 

Please see the attached image where I am unable to view the Collapse icon in my webapp.
I need to implement this fucntionality at the earliest.
So hoping for a quick response from you folks.

Thanks in Advance.

Shouvik

0
Boyan Dimitrov
Telerik team
answered on 05 Dec 2013, 01:28 PM
Hello,

I would like to clarify a couple of things about your scenario:
  1. Adding the RadGrid control using the provided code will not persist after a post-back. In this help article you can find the recommended approach for adding templates to the RadPanelBar at run-time. 
  2. Regarding the question why the collapse/expand icon is not shown: As Princy mentioned in the last response by using ItemTemplate,the content appears in the panel item immediately below its text. The item cannot be collapsed nor expanded. If the item does not have any text, then the contents of the Item Template become the item itself. You can use ContentTemplate instead and also set Height to the PanelBar to make this work. Please refer to provided help article in point 1 and find the approach for adding content template at run-time.

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
PanelBar
Asked by
Vijaianand
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Vijaianand
Top achievements
Rank 1
Shouvik
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or