Expanded after dynamically adding items

2 posts, 0 answers
  1. Derek Hunziker
    Derek Hunziker avatar
    62 posts
    Member since:
    Sep 2008

    Posted 26 Oct 2009 Link to this post

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

    Posted 28 Oct 2009 Link to this post

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