The ASP.NET DataGrid is an extremely flexible control. By catching certain events, such as OnItemDataBound and OnItemCreated, you can further customize the appearance of a grid, including adding rows for totals along columns and rows. These links demonstrate different methods and code samples on how to generate row, column and report totals in an .Net Datagrid.
Create a Summary Row for a DataGrid in ASP.NET by Using Visual Basic .NET
Summary Rows in a DataGrid: A Comparison of Techniques