ref dropdownlist in itemdatabound event?

T

Tina

In the ItemDataBound event I know how to reference the text in a text box in
a template column:
e.item.cells(0).text

but I can't figure out how to reference a dropdownlist in a template column:
e.item.cells(1).????????

how can I reference the control in the template column so that I can fill
it?
thanks,
T
 
S

Suresh

Tina,
I think you have to look inside the cell to see if it has
a drop down list.

You may want to try using
e.Item.Cells[0].FindControl(controlID)

When you find it then you can cast it to an instance of a
DropDownList object and you can go about your business.

HTH,
Suresh.
 

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,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top