I need to add same data in datatable
Eg,:
Type. Reason
A. Amount is 2.5 for type A
A Amount is 1.5. For type A
Since in datatable boththe type is same.i need to add the value in reason my output should be
Type. Reason
A. Amount is 4.0. for type A
Dear @sruthesanju it can be done by the Linq Only i think so please check below query may usefull
dtResults = (From dte In dtTable.AsEnumerable
Group dte By col1=dte(2).ToString.Trim Into Group
Select dtResults.Rows.Add({col1, Group.Sum(Function (x) CInt(x(1).toString.Trim))})).CopyToDataTable
Regards and Thanks,
Swaroop Singh R