View Single Post
  #1 (permalink)  
Old July 7th, 2009, 03:20 PM
gmandrsn gmandrsn is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nested Container control binding

I am using the AjaxControlToolkit and I have several controls that are inside a TabPanel, within a TabContainer. The TabContainer is in a Panel, which is nested in a DataList. (see aspx code below).
The Datalist contains my DataRow, and I need to figure out how to access the DataList to set values in the Tabs child controls from the aspx. Somehting like "Container.Parent.Parent.Container.DataItem" or "Container.Container.DataItem"

Code:
<DataListID="AL"runat="server"DataKeyField="RefNumber"Width="100%">
<ItemTemplate>
   <PanelID="AP"runat="server"GroupingText="Address"CssClass="Addr">
    <TabContainerID="ATS"runat="server">
          <TabPanelID="MemA"runat="server"HeaderText="Member">
             <ContentTemplate>                   <p>
                  <LabelID="HPhLbl"Text="Home"runat="server"Width="75px"/>
                  <TextBoxID="HPh"runat="server"Text=' <%# ((DataRowView)Container.DataItem)["HomePhone"] %> ' />
               </p>
Prior to adding the tabstrip everything loaded correctly, I justneed to understand how to assign values from a Datalist to controls, several containers deep.

Thanks!
Reply With Quote