Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Datagridview click event

$
0
0
I put a click even on the datagridview. Im tryin to get the content of this grid to load some textboxes on a second form. But I kept getting error message,
    Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridViewCheckEmployee.CellContentClick
        frmNewEmployee.Show()
        Me.Hide()
        frmNewEmployee.txtSureName.Text = DataGridViewCheckEmployee.Rows(e.RowIndex).Cells(1).text
        frmNewEmployee.TxtFirstName.Text = DataGridViewCheckEmployee.Rows(e.RowIndex).Cells(2).Text
        frmNewEmployee.TxtMiddleName.Text = DataGridViewCheckEmployee.Rows(e.RowIndex).Cells(2).Text
        frmNewEmployee.TxtFirstName.Text = DataGridViewCheckEmployee.Rows(e.RowIndex).Cells(2).Text
    End Sub


ERRORs
Error 1 'text' is not a member of 'System.Windows.Forms.DataGridViewCell'.
Error 2 'Text' is not a member of 'System.Windows.Forms.DataGridViewCell'.
Error 3 'Text' is not a member of 'System.Windows.Forms.DataGridViewCell'.
Error 4 'Text' is not a member of 'System.Windows.Forms.DataGridViewCell'.

Viewing all articles
Browse latest Browse all 51036

Trending Articles