This is a migrated thread and some comments may be shown as answers.
RadPanelBar Dynamic Binding - ExpanMode Issue
1 Answer 51 Views
This is a migrated thread and some comments may be shown as answers.
Sunny
Top achievements
Rank 1
Sunny asked on 16 Sep 2009, 09:08 PM
This is my code for RadPanelBar which is in usercontrol:

            <Telerik:RadPanelBar runat="server" ID="RadPanelBar1"
            Width="100%" DataValueField="SomeVal" DataTextField="Name" >
            <CollapseAnimation Duration="100" Type="None" />
            <ExpandAnimation Duration="100" Type="None" />            
            <Items>
                
            </Items>
            </Telerik:RadPanelBar>  

UserControl Page_Load

            RadPanelBar1.ExpandMode = PanelBarExpandMode.SingleExpandedItem
            RadPanelBar1.DataFieldID = ""
            RadPanelBar1.DataFieldParentID = "Number"
            RadPanelBar1.DataSource = SomeObject
            RadPanelBar1.DataBind()


   Private Sub RadPanelBar1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadPanelBarEventArgs) Handles RadPanelBar1.ItemDataBound
        Dim ChlRadPanelItem As New RadPanelItem
        ChlRadPanelItem.Value = "Something"
        ChlRadPanelItem.ItemTemplate = New ItemTemplate()
        RadPanelBar1.Items.Add(ChlRadPanelItem)
    End Sub

Problem: PanelBar showing all items expanded

1 Answer, 1 is accepted

Sort by
0
Sunny
Top achievements
Rank 1
answered on 16 Sep 2009, 09:25 PM
Issue Fixed:
e.Item.Items.Add(ChlRadPanelItem)
Asked by
Sunny
Top achievements
Rank 1
Answers by
Sunny
Top achievements
Rank 1
Share this question
or