DataTable distinctTable = dTable.DefaultView.ToTable(true,\"ITEM_NO\",\"ITEM_STOCK\");
DataTable dtSummerized = new DataTable(\"SummerizedResult\");
dtSummerized.Co
In my case the issue was with my query itself.
My query returned difference of two columns. Like, query="Select A,B,A-B from Table"
and I was performing sum on datatable using compute function as dt.Compute("Sum(A-B)","")
.
So, datatable was unable to compute the sum of A-B
column. I gave the difference column alias as query="Select A,B,(A-B) as AB from Table"
and dt.Compute("Sum(AB)","")
.
Thus, resolved the error.