Shovan Saha

Shovan Saha

  • NA
  • 321
  • 92.6k

new datagridview from another 2

Sep 13 2017 11:07 AM
DataTable dt3 = new DataTable();
dt1.Columns.AddRange(new DataColumn[3] { new DataColumn("Sl"), new DataColumn("SoinikNo1"), new DataColumn("Rank1") });
dt.Columns["Id"].AutoIncrement = true;
dt.Columns["Id"].AutoIncrementSeed = 1;
dt.Columns["Id"].AutoIncrementStep = 1;
dataGridView3.DataSource = dt3;
 
I want to make dataGridView3 from dataGridView1 and dataGridView2. I want the column SoinikNo1 from datagridview2 and the Rank1 cell value from datagridview1 if SoinikNo from datagridview1 and datagridview2 is same. Please give sample code or example that I can understand.
 
 

Answers (2)