Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a repeater and i need to add sub totals and a grand total of a field (timespent) of type double by date field.

I've tried using lamda expression to get subtotal and grand total it does work except that it only gives you a list of the subtotal and I need the whole data set with maybe additional column or rows for every date.

Your assistance will be highly appreciated as I need to get this working as soon as posible.

Regards
Danny
Posted

1 solution

wrote:
I've tried using lamda expression to get subtotal and grand total


Is it at all related with adding few values.. Yes it is possible way of writing the logic but not related to your actual problem.

Well, Regarding your requirement, the only thing that you need is to take a class variable and add the values during OnItemDataBound event handler.

You can easily evaluate data elements inside this eventhandler using

DataBinder.Eval

If you cant do this or dont have any idea refer to :
http://msdn.microsoft.com/en-us/library/c012haty(VS.71).aspx[^]

:thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900