I want to display data in a DataGridView
control, this data will take its values from 3 tables (boq_table, submittal, summary)
such as;
itemNum
||descriptionOfWork
||unit
||contractualQuantity
||priceNum
from boq_table.executedQuantLastSummary
||priceLastWorks
||executedQuantBetw2Sum
from summary.priceCurrentWorks
from submittal.
And there are two
columns that should fill after the calculation process in two fields displayed in DataGrid
view is it possible to make this calculation automatically after fill data in dataGridView
or should it be before filling?
I am trying to use Full outer in code below but it doesn't work.
adapter = new MySqlDataAdapter("SELECT ubc.boq_table.itemNum AS '1', ubc.boq_table.descriptionOfWork AS '2', ubc.boq_table.unit AS '3', ubc.boq_table.contractualQuantity AS '4', ubc.boq_table.priceNum AS '5' , ubc.summary.executedQuantLastSummary AS '6', ubc.summary.priceLastWorks AS '7 ', ubc.summary.executedQuantBetw2Sum AS '8' , ubc.submittal.priceCurrentWorks AS '9 ' from ubc.boq_table FULL OUTER JOIN ubc.summary ON ubc.boq_table.itemNum = ubc.submittal.itemNum = ubc.summary.itemNum where projectName='" + projectNameText.Text + "' And itemNum= '" + textBox3.Text + "' ", connection);
table = new DataTable();
adapter.Fill(table);
dataGridView1.DataSource = table;