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.
Nazmul BadshaPosted Sep 14, 2017, 1:29 AM
Shovan SahaPosted Sep 14, 2017, 9:18 AM
C#, desktop application
I have a datagridview like this:
ID
Date
SoinikNo
APenName
Pension
Utsob
9
01/01/2017
L
A
3
2
16
05/02/2017
M
B
4
3
29
12/03/2017
L
A
5
7
33
17/04/2017
M
B
6
8
47
25/05/2017
L
A
3
5
52
13/06/2017
S
C
2
9
82
02/07/2017
S
C
1
12
I need a new datagridview / iTextsharp pdf like this:
Sl. No.
SoinikNo
APenName
Pension
Utsob
1
L
A
11
14
2
M
B
10
11
3
S
C
3
21