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.
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
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:
DimpanelItem AsRadPanelItem = NewRadPanelItem()
panelItem.Text = drv("trcNum")
panelItem.Expanded = True
DimpanelForItems AsNewPanel() 'Created a new panel
panelForItems.Controls.Add(escrowGrid) 'Added the grid in the panel
panelItem.Controls.Add(panelForItems) 'Added the panel in RadPanelItem
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.
answered on 05 Dec 2013, 01:28 PM
I would like to clarify a couple of things about your scenario:
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.
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.
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.