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.
Summary Rows in DataGrid Controls
Adding a Totals Field in a DataGrid
Advanced Data Reporting - Aggregates and Summary Rows