Hi Friends,
how to write" if"" condition to find number of rows and assign each row ""Column1"" value to string.
int nos = 0;
nos = dataGridView1.CurrentCell.RowIndex;
if (nos == 0)
{
TxtInput30 = dataGridView1.Rows[0].Cells["Column1"].Value.ToString();
}
if (nos == 1)
{
TxtInput30_2 = dataGridView1.Rows[1].Cells["Column1"].Value.ToString();
}Thanks for your help.