How to open a form when i click tab in the grid cell?

aj_daria

Member
Joined
Jan 23, 2007
Messages
6
Programming Experience
Beginner
i have a datagrid that use for display data, add, delete or edit the data from database. how i want to call a form when i click tab in one particular cell in the datagrid?
 
When you say "Click Tab", do you mean "press the Tab key" or do you mean you have embedded a Tabbed Page Control in the cell?

Please be more clear when asking questions
 
This works when StandardTab property is default False and cell is not in Edit mode.
VB.NET:
Private Sub DataGridView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _
Handles DataGridView1.KeyDown
    If e.KeyCode = Keys.Tab Then
        If DataGridView1.CurrentCell.ColumnIndex = 0 AndAlso DataGridView1.CurrentCell.RowIndex = 2 Then
            HaloForm.Show()
        End If
    End If
End Sub
Beware that Tab key is default key to move to next cell in DataGridView control.
 
thanks for ur reply, but i have one question, what is the difference between datagrid and datagridview?currently, im using datagrid.
 
DataGridView control in .Net 2.0 replaces the old DataGrid control. DataGridView is much better/easier.
 
Back
Top