private void dgvRowsEdit_DoubleClick(object sender, EventArgs e) { DataGridViewSelectedRowCollection rc = null; rc = dataGridView1.SelectedRows; nametxt.Text = rc[0].Cells["Name"].Value.ToString(); nictxt.Text = rc[0].Cells["[N.I.C]"].Value.ToString(); entrytxt.Text = rc[0].Cells["EntryTime"].Value.ToString(); emptxt.Text = rc[0].Cells["EmployeeName"].Value.ToString(); purposetxt.Text = rc[0].Cells["PurposeOFVisit"].Value.ToString(); remarkstxt.Text = rc[0].Cells["Remarks"].Value.ToString(); }
DataGridViewRow dr = dataGridView1.SelectedRows[0]; nametxt.Text = dr.Cells[0].Value.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)