I have a simple form, including only a toolbar and a datagrid. When loaded, I want to set a start cell, so that the user can edit immediately without having to click into the cell. This is what I tried:
Any ideas where I made a mistake?
Code:
Dim dgc As New DataGridCell(0, 1)
Dim dgtb As DataGridTextBoxColumn
'..... code
Me.grdData.Focus()
Me.grdData.CurrentCell = dgc
dgtb = CType(Me.grdData.TableStyles(0).GridColumnStyles(1), DataGridTextBoxColumn)
dgtb.TextBox.Focus()
dgtb.TextBox.Select()