how to access control in template datagrid

G

Guest

Hi I need to change the text value of a dropdown list box that is in a
template column of a data grid but was not sure how to access it, probably
something like
datagrid1.control.dropdownlist.text = "" but not sure.
 
G

Guest

Hi Shailesh, thanks for the response. I set up the following in the
ItemDataBound event and set a breakpoint but has nothing in s_temp.
here is the control id <asp:dropdownlist id=dr_lst_dest
in the ItemDataBound event for the grid I have
Dim s_temp As Object
s_temp = e.Item.FindControl("dr_lst_dest")'breakpt here
End Sub
Also I need to read the selected value when someone makes a selection
probably in the
DataGrid1_SelectedIndexChanged event, was not sure if you have done that
before.
 
G

Guest

Just a bit more information. looks like the ItemDataBound event fires 3
times, and after the second time looks like it does find the contol. I have
several column with the datagrid binded to a data set and then 3 columns with
dropdown list boxes with each data binding to a dataset.
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top