Hi,
I have a datagrid with the columns ItemPrice and ItemQuantity and Total, I would like to multiply the ItemPrice and ItemQuantity columns to get the total. I've tried searching around but in vain, I know its been done before and I've seen multiple software systems do this. Could someone help me.
Arithmetic in datagrid columns
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Apr 16, 2008, 8:48 AM EDT
You can do it in following way:
DataColumn dtc=new DataColumn("Sum",typeof(int));
dtc.Expression="Quantity * Cost";
dataTable.Columns.Add(dtc);