i have a datagridview and textbox in windows form,when i click on a cell of the datagridview the value must copy to the textbox.
I am getting a error:
System.Windows.Forms.DataGridCell Does not contain a definition for RowIndex
I have tried this code
void dataGridView1_Click(object sender, EventArgs e)
{
Txt_GangApproved.Text=dataGridView1.CurrentCell.RowIndex.Cells["NO_OF_GANGS_RQRD"].Value.ToString();
}
1 Answer