Shovan Saha

Shovan Saha

  • NA
  • 321
  • 91.9k

How can I call this code on button click?

Sep 8 2017 11:05 AM
int SlNo = 0;
var groupedData = from b in datatable.AsEnumerable()
group b by b.Field<string>("Item") into g
select new
{
SlNo = ++SlNo,
Item = g.Key,
TotalPrice = g.Sum(x => x.Field<int>("Price"))
};

Answers (3)