PDA

Click to See Complete Forum and Search --> : Template Column Row Numbers? (RESOLVED)


SeanGrebey
Sep 26th, 2005, 08:33 AM
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?

SeanGrebey
Sep 26th, 2005, 08:53 AM
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