i have a dataList that is nested.
i would like to check for various things in the nested / child data 
list before displaying the data.

how do get access to the child data in a nested dataList in the 
ItemDataBound event? 

specifically, i would like to change the visibility of pnlMap 
depending on the value of the hplMapImage URL or a fileID that i am 
storing in the codebehind for the "current" file. 

the code below shows the datalist in the aspx page.

<asp:DataList ID=dlEventMap 
Runat=server 
RepeatColumns=1 
Width=100% 
ItemStyle-BackColor="#FFFFFF"
CellSpacing=10 
ItemStyle-CssClass="bodyheadwhite" 
ItemStyle-BorderWidth=0 
HeaderStyle-BorderWidth=0>
<ItemTemplate>
<tr align="left" valign="top"> 
<td colspan="5" class="bodyheadwhite" bgcolor="#336633">
<a name="<%# Container.DataItem("EventID") %>"></a>
<asp:Label ID=lblTitle Runat=server></asp:Label>
</td>
</tr>
<tr align="left" valign="top"> 
<td colspan="5" class="bodytext">
<asp:Label ID="lblEventDesc" Runat=server></asp:Label>
</td>
</tr>   
<tr align="left" valign="top"> 
<td colspan="5" height="29"> 
<table width="117" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="28">
<span class="bodytext">
<asp:HyperLink ID=hplMapImage Runat=server><img 
src="images/global/icon_map.gif" width="25" height="25" border="0" 
alt="Current Map"></asp:HyperLink>
</span>
</td>
<td width="81" class="bodytext">
<asp:HyperLink ID=hplMapText Runat=server></asp:HyperLink>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
***********************
***********************
BELOW IS THE STUFF I WANT TO ACCESS IN ITEMDATABOUND EVENT
***********************
***********************
<asp:DataList runat="server" 
Id="ChildDataList" 
cellpadding="0" 
cellspacing="0"
datasource='<%# Container.DataItem.Row.GetChildRows("LinkRelation") %
>'
Width=100% 
ItemStyle-BackColor="#FFFFFF" 
SeparatorStyle-BackColor="#FFFFFF"  
BorderColor="#FFFFFF" 
BorderWidth=0 
AlternatingItemStyle-BackColor="#FFFFFF" 
RepeatColumns=4>
<ItemTemplate>
<asp:Panel ID="pnlMap" Runat=server>
<p>
<span class="bodytext">
<a href="Files/FileManager/<%# Container.DataItem("FileName") %>"><%# 
Container.DataItem("FileName") %></a>
</span>
<br>
<span class="bodytext"><%# Format(Container.DataItem
("InsertDate"),"Long Date") %></span>
</p>
</asp:Panel>
</ItemTemplate>
</asp:DataList>
</td>
</tr> 
</ItemTemplate>
</asp:DataList>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to