I would use the ItemCreated event. For example, if we were to build on this
QuickStart tutorial to copy the selected row values on the GridView as the
default for the newly inserted record:
http://www.asp.net/QuickStart/aspnet/doc/ctrlref/data/detailsview.aspx
I would write:
Protected Sub DetailsView1_ItemCreated(ByVal sender As Object, _
ByVal e As EventArgs)
'execute the following only when inserting a new record
If DetailsView1.CurrentMode = DetailsViewMode.Insert Then
'each row corresponds to a BoundField on the DetailsView definition
'Row(1) is the second field: the au_lname field
'when it renders in insert mode, it renders a cell that has a
'textbox in it. We want to set the textbox.text property to
'the au_lname from the selected row on the GridView
Ctype(DetailsView1.Rows(1).Cells(1).Controls(0), TextBox).Text= _
GridView1.SelectedRow.Cells(2).Text
'continue to set the other textboxes on the record to be
'inserted using the same process
End If
End Sub