guys plz help me, i dont know how to build a for loop for my code
following is my code
dataGridView1.Rows.Add();
dataGridView1.Rows[0].Cells[0].Value = dt.Rows[0][0].ToString();
dataGridView1.Rows[0].Cells[1].Value = dt.Rows[0][1].ToString();
dataGridView1.Rows[0].Cells[2].Value = dt.Rows[0][2].ToString();
dataGridView1.Rows[0].Cells[3].Value = dt.Rows[0][3].ToString();
dataGridView1.Rows[0].Cells[4].Value = dt.Rows[0][4].ToString();
dataGridView1.Rows[0].Cells[5].Value = dt.Rows[1][4].ToString();
dataGridView1.Rows[0].Cells[6].Value = dt.Rows[2][4].ToString();
dataGridView1.Rows[0].Cells[7].Value = dt.Rows[3][4].ToString();
dataGridView1.Rows[0].Cells[8].Value = dt.Rows[0][5].ToString();
dataGridView1.Rows[0].Cells[9].Value = dt.Rows[0][6].ToString();
above code is for one data row, i have more than 1000 rows. i think it is possible through only for loop, please anybody help me, thank u in advance
Bahubali GanePosted Apr 7, 2016, 3:24 AM
Vivek BansodPosted Apr 7, 2016, 2:45 AM
Vivek BansodPosted Apr 7, 2016, 2:44 AM
Bahubali GanePosted Apr 7, 2016, 1:46 AM
Bahubali GanePosted Apr 7, 2016, 1:46 AM
Bahubali GanePosted Apr 7, 2016, 1:46 AM
Bahubali GanePosted Apr 7, 2016, 1:41 AM
Nishant MittalPosted Apr 7, 2016, 12:59 AM
Vivek BansodPosted Apr 7, 2016, 12:56 AM