RadPanelItem ItemTemplate Not Binding

1 posts, 0 answers
  1. Taylor
    Taylor avatar
    1 posts
    Member since:
    Jan 2019

    Posted 28 Jan Link to this post

    I am working with RadPanelBar and RadPanelItem objects.   On page load, I have anIEnumberable of a type that I iterate over to build my 1st and 2nd layers of PanelItems.   Iam using the ItemTemplate features and setting those to each object.   The issue I'm encountering is that when I postback to update some information,  The ItemTemplate for each PanelItem and it's children is null.   Below is a snippet of how i'm building out the PanelBar.  I need to be able to access the user controls inside each template to update some data.

     

    foreach (var integration in integrations)
               {
                   RadPanelItem integrationGroup = new RadPanelItem(integration.Name);
                   integrationGroup.ItemTemplate = new IntegrationItemEnabledTemplate(integration.UniqueId, integration.IsActive);
                   foreach (var param in integration.Parameters)
                   {
                       if (!string.IsNullOrEmpty(param.Key))
                       {
                           var pnlItem = new RadPanelItem();
                            
                           pnlItem.ItemTemplate = new IntegrationItemTemplate(param.Integration, param.Key, param.Value);
                           integrationGroup.Items.Add(pnlItem);
                       }
                   }
     
                   integrationsPanel.Items.Add(integrationGroup);
     
               }
               integrationsPanel.DataBind();
Back to Top