we can easily find out the sum from a list of collection. if the list is used in data grid or any other control as a data source we can easily find out the sum of any item field from the list using LINQ.
Thanks.
var totalQty = ViewData.Requisition.DC_RequisitionItemList.Sum(item => item.ItemTotalValue);
ViewData.TotalQty = totalQty;
Thanks.
Comments
Post a Comment