iterate thru controls in Table Cells?

  • Thread starter Thread starter JDavies
  • Start date Start date
J

JDavies

Hi All

I am dynamically Creating DropDownList boxes for a Survey form. These
DropdownLists are added to Table Cells programatically.

I tried to loop thru the controls on the form but it doesnt seem to work
right, the loop appears below:

for each cntl in page.controls(1).controls
ddlId = cntl.Id
debug.write(ddlID)

next


nothing Fancy i am just trying to find the controls and then later on get
the value from the selection.

However, i can find the Table they are on but i never see the control it
self?????

How do i get the DropdownList when it is in a Table cell?

Any help is greatly Appreciated

TIA
Samantha
 
JDavies said:
Hi All

I am dynamically Creating DropDownList boxes for a Survey form. These
DropdownLists are added to Table Cells programatically.

I tried to loop thru the controls on the form but it doesnt seem to work
right, the loop appears below:

for each cntl in page.controls(1).controls
ddlId = cntl.Id
debug.write(ddlID)

next


nothing Fancy i am just trying to find the controls and then later on get
the value from the selection.

However, i can find the Table they are on but i never see the control it
self?????

How do i get the DropdownList when it is in a Table cell?

Any help is greatly Appreciated

Are you looking in the table's Controls collection? That will contain
TableRows. You would need to look in their Controls collection, which will
contain TableCells. Their Controls collection will contain your
DropDownLists (assuming that's where you put them).
 
Yes i am trying to find the controls in the table, but being new to .Net i
am not quite sure how i go about it

If you could send me to a web page example or provide and example i wuld
greatly appreciate it


TIA
Samantha
 
Back
Top