Two Edit Columns in Datagrid?

Try this...

dim txt as texbox = CType(e.Item.Cells(1).Controls(0), TextBox)
// Cell(1) being the column index

or if you used TemplateColumn / EditItemTemplate to place the controls
dim dd as Dropdownlist = CType(e.Item.FindControl("myDropdown"), DropDownList)


BTW, the above code goes in the UpdateCommand event of the datagrid
 
Back
Top