In my DetailsView, when there is no matching record, I want to switch it to Insert Mode.
I have tried
but that doesn't work.
(Kodo, I'm sorry if I'm wearing you out here )
I have tried
Code:
If Me.DetailsView1.Rows.Count = 0 Then
Me.DetailsView1.DefaultMode = DetailsViewMode.Insert
Else
Me.DetailsView1.DefaultMode = DetailsViewMode.ReadOnly
End If
(Kodo, I'm sorry if I'm wearing you out here )