Access controls inside header from item datatbound

2 posts, 0 answers
  1. Roukaya
    Roukaya avatar
    17 posts
    Member since:
    Aug 2012

    Posted 24 Apr 2013 Link to this post

    hello all , 

    i've this piece of code : 
    <telerik:RadPanelBar runat="server" ID="RewardsPB" Width="900px" OnItemDataBound="RewardsPB_ItemDataBound" AppendDataBoundItems="false" OnItemCreated="RewardsPB_ItemCreated" OnClientItemClicked="stopPropagation">
                <Items>
                    <telerik:RadPanelItem >
                        <HeaderTemplate>
                            <asp:DataList runat="server" ID="PartnerDL" RepeatColumns="4">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("STORE_NAME") %>'></asp:Label>
                                    <asp:LinkButton runat="server" ID="Img"><img src='<%# "/images/products/prod_" + Eval("STORE_ID")+".png"%>' width="75px" height="75px"/></asp:LinkButton>
                                </ItemTemplate>
                            </asp:DataList>
                        </HeaderTemplate>
     
                    </telerik:RadPanelItem>
                </Items>
     
            </telerik:RadPanelBar>


    i want to access the DataList : "PartnerDL" from itemDataBound event ..

    How can i achieve that ??? 

    Thanks in advance ... 
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Apr 2013 Link to this post

    Hi,

    Try the following code.
    c#;
    void RewardsPB_ItemDataBound(object sender, RadPanelBarEventArgs e)
      {
         var list = RewardsPB.Items[0].Header.FindControl("PartnerDL");
      }

    Thanks,
    Shinu
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top