set focus to a cell in a datagrid
How can I make on specific cell have the focus?
This is how I tried it:
Dim dgc As New DataGridCell(0, 1)
Dim dgtb As DataGridTextBoxColumn
Me.grdData.Focus()
Me.grdData.CurrentCell = dgc
dgtb = CType(Me.grdData.TableStyles(0).GridColumnStyles(1), DataGridTextBoxColumn)
dgtb.TextBox.Focus()
dgtb.TextBox.Select()
This seems to work only half: when I press the arrow-down-button the text within my cell is selected. But I want the user to be able to write data in the current cell without clicking in it. How can I do it?