If I have this in the ASPX
And I try to do this from C#
It works fine, however when I try to add custom content rather than RadPanelItems like this:
while I see the results on the page when clicking on the header the panel bar would not collapse. From a quick look at the rendered HTML the rpExpandable CSS class is not applied in the later case (when adding labels) -- not sure if this makes a difference or not.
Thanks.
P.S. this behavior is not browser specific.
<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Outlook" Width="190px" ExpandMode="MultipleExpandedItems"> |
<CollapseAnimation Duration="100" Type="None" /> |
<ExpandAnimation Duration="100" Type="None" /> |
</telerik:RadPanelBar> |
And I try to do this from C#
var m1 = new RadPanelItem("item 1"); |
m1.Items.Add(new RadPanelItem("sub1")); |
m1.Items.Add(new RadPanelItem("sub2")); |
m1.Items.Add(new RadPanelItem("sub3")); |
RadPanelBar1.Items.Add(m1); |
var m2 = new RadPanelItem("item 2"); |
m2.Items.Add(new RadPanelItem("sub1")); |
m2.Items.Add(new RadPanelItem("sub2")); |
m2.Items.Add(new RadPanelItem("sub3")); |
RadPanelBar1.Items.Add(m2); |
It works fine, however when I try to add custom content rather than RadPanelItems like this:
var m1_d = new RadPanelItem("item custom"); |
m1_d.Controls.Add(new Label() { Text = "sub1", ID = "s1" }); |
m1_d.Controls.Add(new Label() { Text = "sub2", ID = "s2" }); |
m1_d.Controls.Add(new Label() { Text = "sub3", ID = "s3" }); |
RadPanelBar1.Items.Add(m1_d); |
while I see the results on the page when clicking on the header the panel bar would not collapse. From a quick look at the rendered HTML the rpExpandable CSS class is not applied in the later case (when adding labels) -- not sure if this makes a difference or not.
Thanks.
P.S. this behavior is not browser specific.