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

RadPanelItem ItemTemplate Not Binding

0 Answers 46 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Taylor
Top achievements
Rank 1
Taylor asked on 28 Jan 2019, 09:38 PM

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();

No answers yet. Maybe you can help?

Tags
PanelBar
Asked by
Taylor
Top achievements
Rank 1
Share this question
or