how to access control in template datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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.
 
Back
Top