What does sender.Parent.Parent.Cells() reference? Frustrating...

R

Roy

Ok, this is incredibly annoying. Below I have an ImageButton and it's
ImageButton_Click sub. See the 6 response.writes? The output for them
is displayed below in asterisks. Question: What part of the
TemplateColumn below does sender.parent.parent.Cells(9) reference???
IOW, what tag does it reference? The templatecolumn is the 9th field in
the datagrid yet no matter what I do, whatever
"sender.parent.parent.Cells(9)" is referencing, I do not have access
to. Help!

*System.Web.UI.WebControls.TableCell*
*blank, nothing displayed*
*System.Web.UI.WebControls.DataGridItem*
*blank, nothing displayed*
*System.Web.UI.WebControls.TableCell*
*blank, nothing displayed*


Public Sub ImageButton_Click(sender As Object, e As
ImageClickEventArgs)
response.write(sender.parent)
response.write(sender.parent.id)
response.write(sender.parent.parent)
response.write(sender.parent.parent.id)
response.write(sender.parent.parent.Cells(9))
response.write(sender.parent.parent.Cells(9).id) <<<<---REFERENCE?
End Sub

**********0th Column in datagrid*****
<asp:TemplateColumn><ItemTemplate>
<asp:ImageButton id="imagebutton1" runat="server" AlternateText="Click
to Expand Record"
ImageAlign="left" ImageUrl="arrow_right.gif"
OnClick="ImageButton_Click"/>
</ItemTemplate></asp:TemplateColumn>

*********9th column in datagrid******
<asp:TemplateColumn><ItemTemplate>
<tr id="tr"><td colspan="9" id="td">
<UC_Grid:Nested id="FVDGrid" x=<%# container.dataitem("vown")%> y=<%#
container.dataitem("van_no")%> runat="server" />
</td></tr>
</ItemTemplate></asp:TemplateColumn>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top