Control Position

Discussion in 'ASP .Net Web Controls' started by David Bell, Nov 20, 2006.

  1. David Bell

    David Bell Guest

    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
     
    David Bell, Nov 20, 2006
    #1
    1. Advertising

  2. David Bell

    MikeS Guest

    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();");
    }
    }
    }
     
    MikeS, Nov 21, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luqman
    Replies:
    1
    Views:
    657
    Luqman
    Feb 7, 2006
  2. James Wong
    Replies:
    4
    Views:
    503
    James Wong
    Jul 14, 2004
  3. Replies:
    3
    Views:
    184
  4. James Black
    Replies:
    0
    Views:
    403
    James Black
    May 28, 2006
  5. brendan
    Replies:
    0
    Views:
    199
    brendan
    Aug 29, 2006
Loading...

Share This Page