Hi Guys
Suppose I am having two columns and I wanted to perform multiplication on that and want output on another column
so how Can I.....?
Column Name :- Amt Quantity Total
total = Amt * Quantity.
Please hepl me........
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ankit RathorePosted Feb 1, 2010, 5:00 AM
Please solve my problem ,
these things are not working ..............
SreekanthPosted Feb 1, 2010, 4:08 AM
Lalit MPosted Feb 1, 2010, 3:27 AM
DataTable dt = new DataTable();
DataColumn column4;
column4 = new DataColumn();
column4.ColumnName = "Column3";
column4.Caption = "Column3";
column4.Expression = "Column1*Column2";
dt.Columns.Add(column3);
Jacob RPosted Feb 1, 2010, 2:33 AM
dataGridView1(0,2).Value = myTotal.ToString();
dataGridView1.RefreshEdit();
my syntax might be off. I dont mess with dataGridView much. If the above doesn't work try dataGridView1.Rows[0].Cells[0].Value. Also, remember that the rows and columns start at 0 and not 1