var TatalFeeCollectionDetail = new List<lcclsTotalFeeCollectionDetail>();
TatalFeeCollectionDetail = (from t in .......
group t by new { t.MonthName,t.FeeParticularName }
into grp
select new lcclsTotalFeeCollectionDetail
{
Month = grp.Key.MonthName,
Particular = grp.First().FeeParticularLedgerName,
Amount = grp.Sum(t => t.Amount),
}).ToList();
dgvTotalFeeCollectionDetail.DataSource = TatalFeeCollectionDetail;
My result is this .............
Month particular Amount
April b 1
April c 2
April d 1
April e 2
April f 1
I want to convert it like this can any1 help me...........I search for it but can,t understood what to do....
Month b c d e f Total Amount
April 1 2 1 2 1 7
Thanxxxxxxx in advance