3
Answers

How can I call this code on button click?

Shovan Saha

Shovan Saha

7y
186
1
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)