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

Expanded after dynamically adding items

1 Answer 47 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Derek Hunziker
Top achievements
Rank 1
Derek Hunziker asked on 26 Oct 2009, 10:13 PM
Hi There,

When I add items to the clicked item in the ItemClick event, I would like the current item (e.Item) to be expanded after the postback. Setting the Expanded property does not work for me.

Thanks,

-Derek

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Oct 2009, 11:05 AM
Hi Derek,

I tried the scenario and found it is working fine for me. The clicked item expanded after adding the new item to PanelBarItem.

C#:
 
protected void RadPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e) 
    RadPanelItem newItem = new RadPanelItem("New"); 
    e.Item.Items.Add(newItem); 
    e.Item.Expanded = true
Could you paste the code that you tried if you are trying different way to accomplish this?

-Shinu.
Tags
PanelBar
Asked by
Derek Hunziker
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or