I have a gridview that shows, for example, the statistics of a baseball team. This is a standard grid of sports statistics - the rows show statistics for each player, and the columns show a specific indicator for each player.
Easy enough. But what I would like to do is style (highlight or bold) Max or Min (group leader) of each stat column. For example, player A can only lead one or two categories, so we cannot create a whole line style. If player A simply leads the team in outs, I just want to set the number of strikeouts he has had (only for this cell).
What is the best way to handle this? Do SQL Server all the work and act, become EVERY stat of each player, effectively doubling the number of columns (for example, col: AB, col: ABRank). Or can I let this rowdatabound gridview event handle this?
If I chose the latter, I think that I will get the Max of each statistic category from the datatable before binding (for example, save them in a local variable), and then in rowdataound, if they match the value, apply the style.
source share