I'm developing a form with a datagrid and a text box. When the user clicks on
the datagrid I copy the data into the text box. I then want the focus to
switch to the text box, but the datagrid keeps grabbing it back again. Any
ideas?
Private Sub DataGrid1_Curre ntCellChanged(B yVal sender As Object, ByVal e As
System.EventArg s) Handles DataGrid1.Curre ntCellChanged
TextBox1.Text = DataGrid1(DataG rid1.CurrentRow Index, 0)
TextBox1.focus( )
End Sub
The text box gets the focus briefly, then the datagrid gets it back again
vb.net 2003 if it makes a difference
the datagrid I copy the data into the text box. I then want the focus to
switch to the text box, but the datagrid keeps grabbing it back again. Any
ideas?
Private Sub DataGrid1_Curre ntCellChanged(B yVal sender As Object, ByVal e As
System.EventArg s) Handles DataGrid1.Curre ntCellChanged
TextBox1.Text = DataGrid1(DataG rid1.CurrentRow Index, 0)
TextBox1.focus( )
End Sub
The text box gets the focus briefly, then the datagrid gets it back again
vb.net 2003 if it makes a difference