Displaying Column Summaries
Imagine that you want to display a column total at the bottom of a column. In that case, you can handle the GridView RowDataBound
event to sum the values in a column and display the summary in the column footer.
For example, the page in Listing 11.29 contains a GridView
control that displays a summary column representing the total box office sales of all movies (see Figure 11.21).
Figure 11.21. Displaying a column summary.
Listing 11.29. SummaryColumn.aspx
The GridView
control uses a TemplateField
to represent the ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.