Applies to Silverlight 3, 4 and 5
Sorting the values within a column in a control such as a
DataGrid is something that we take for granted. Silverlight's implementation has some very strong sorting options working out of the box for us. It allows us to sort by clicking on the header of a column, amongst other things.
Along with sorting, the
DataGrid enables the grouping of values. Items possessing a particular property (that is, in the same column) and having equal values can be visually grouped within the
All of this is possible by using a view on top of the bound collection. In this recipe, we'll look at how we can leverage this view to customize the sorting and grouping of data within the