How to set a start cell in datagrid

Heike

Regular
Joined
Jun 5, 2002
Messages
56
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:
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()
Any ideas where I made a mistake?
 
Back
Top