for (int k = 0; k < dataGridView3.Rows.Count; k++) { for (int i = 0; i < dataGridView1.Rows.Count; i++) { string j12 = dataGridView3.Rows[k].Cells[1].Value.ToString(); string J13 = dataGridView3.Rows[k].Cells[2].Value.ToString(); double m = double.Parse(J13) if (dataGridView1.Rows[i].Cells[0].Value.ToString() == j12) { dataGridView1.Rows[i].Cells[2].Value = m; dataGridView1.Rows[i].Cells[3].Value = m; } else { dataGridView1.Rows[i].Cells[2].Value = "0.00"; dataGridView1.Rows[i].Cells[3].Value = "0.00"; } }
Table A id column 1 data1 2 data2 3 data3 4 data4 Table B id column 1 data10 3 data30
Table C id column 1 0 2 data2 3 0 4 data4
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)