SumColumn: Custom DataGrid Column that automatically shows Sum/Count/Average in DataGrid Footer.
A normal requirement in any ASP.Net application is to sum/average up the values in a DataGrid column to the Footer. In this article we will compare the normal methods and later create our own custom DataGrid column SumColumn, derived from BoundColumn to avoid repetition of the same code.
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: SumColumn: Custom DataGrid Column that automatically shows Sum/Count/Average in DataGrid Footer.

StevePosted May 26, 2009, 6:59 AM EDT
I did something mildly similar before. Rather than write ASP.Net code to summarize data, I used T-SQL and temporary tables. One grid that represents the detail of the data, a second one that summarizes, in this case money, values such as Month-To-Date and Year-To-Date. Both are temporary tables returned by the stored procedure but who's life-span is the execution of the procedure. It's quick and clean, and all the logic and work is back-ended to the server. The ASP.Net code is just a few lines, amounting to assigning the result set from the procedure to the grid.
shafaqat aliPosted May 20, 2009, 8:53 PM EDT
System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'. 'Custom:CustomColumn' is of type 'Custom.CustomColumn'. "Custom"=My ClassLibraryName "CustomClass"= my class name
Jorge SalinasPosted May 20, 2009, 11:46 AM EDT
Very useful, i'm using this right away.
rama kishoreeditedPosted Feb 21, 2006, 12:39 AM ESTEdited Apr 18, 2006, 6:49 AM EDT
It is very useful application. while way of telling the application is also very good. my email is [email protected] Regards, ramakishore. [edit]