Home All Groups Group Topic Archive Search About
Author
20 Nov 2006 12:45 PM
David Bell
Hi Group,

I am trying to find the position of a control in a asp:table.
I am trying to add a pop up calendar to an image button that is in an
asp:table.
I need to find the position dynamically because the first 2 columns in my
table have dropdownlists that vary in size.
My table is being built dynamically and in is within a flow layout grid.
How do i find the position of my image button?

thanks

David Bell

Author
21 Nov 2006 12:43 AM
MikeS
Is looping through all the Rows and Cells out of the question?

Maybe something like this.

        foreach (TableRow r in Table1.Rows)
        {
            foreach (TableCell c in r.Cells)
            {
                Image i = (Image)c.FindControl("Image1");
                if (i)
                {
                    i.Attributes.Add("onclick", "return
popCalenendar();");
                }
            }
        }