October 2010
Intermediate to advanced
1920 pages
73h 55m
English
GridView RowsImagine that you want to highlight particular rows in GridView. For example, when displaying a table of sales totals, you might want to highlight the rows in which the sales are greater than a certain amount.
You can modify the appearance of individual rows in a GridView control by handling the RowDataBound event. For example, the page in Listing 11.28 displays every movie that has a box office total greater than $300,000.00 with a yellow background color (see Figure 11.20).
Figure 11.20. Highlighting rows in the GridView control.

Listing 11.28. HighlightRows.aspx
In Listing 11.28, the grdMovies_RowDataBound()