Control Position

D

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
 
M

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();");
}
}
}
 

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,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top