L
Luqman
I have coded in Textbox_changed Event:
If CType(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = True
Exit Sub
End If
When page is loaded 1st time, and I type 0 (Zero) in Textbox and press
Enter, DetailView changes its mode to Insert Mode, which I require, however
if I press Cancel on DetailView without entering anything and then click on
textbox and press Enter again after typing 0 (Zero), nothing happens, any
idea please ?
It seems that DetailView Cancel Button has added some extra character in the
Textbox which is not visible to me.
Best Regards,
Luqman
If CType(txtVoucherNo.Text, Long) = 0 Then
Me.DetailsView1.ChangeMode(DetailsViewMode.Insert)
Me.DetailsView1.AutoGenerateInsertButton = True
Me.DetailsView1.AutoGenerateEditButton = True
Exit Sub
End If
When page is loaded 1st time, and I type 0 (Zero) in Textbox and press
Enter, DetailView changes its mode to Insert Mode, which I require, however
if I press Cancel on DetailView without entering anything and then click on
textbox and press Enter again after typing 0 (Zero), nothing happens, any
idea please ?
It seems that DetailView Cancel Button has added some extra character in the
Textbox which is not visible to me.
Best Regards,
Luqman