RadPanelBar - Not showing collapse icon

5 posts, 0 answers
  1. Vijaianand
    Vijaianand avatar
    82 posts
    Member since:
    Jul 2012

    Posted 06 Oct 2011 Link to this post

    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>
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 11 Oct 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vijaianand
    Vijaianand avatar
    82 posts
    Member since:
    Jul 2012

    Posted 11 Oct 2011 Link to this post

    That worked. THanks. 
  5. Shouvik
    Shouvik avatar
    7 posts
    Member since:
    Dec 2013

    Posted 02 Dec 2013 Link to this post

    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

  6. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 05 Dec 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017