Are you sure you want to use a dataGrid and not a GridView?
Anyway, handle the RowSelected event. in the handler get the selected row with something like...
Dim row As GridViewRow = myGridView.SelectedRow (I'm not sure what the equivalent dataGrid construct is).
Then get the ID of the row from the GridView/DataGrid's DataKey's property (which you set in the declaration to the primary key of the underlying table).
Finally pass that on to your details view and tell it to become visible.
HTH
Aaron
|