iterate thru controls in Table Cells?

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
 
J

John Saunders

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).
 
J

JDavies

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
 

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,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top