If I am defining an event for a control embedded in a Template Column, for example a DropDownList. How can I determine which row of the datagrid or underlying dataset I am working with from within that Event?
Printable View
If I am defining an event for a control embedded in a Template Column, for example a DropDownList. How can I determine which row of the datagrid or underlying dataset I am working with from within that Event?
Nevermind, figured it out. In case anybody was wondering I used:
Dim ddlMyList As DropDownList = DirectCast(sender, DropDownList)
Dim cell As TableCell = ddlCallCode.Parent
Dim row As DataGridItem = cell.Parent
Dim index As Int32 = row.SelectedIndex