Xceed DataGrid for Silverlight Documentation
SortDescriptions Property (DataGridControl)
Example 


Gets a collection of sort descriptions that describe how the items in a grid are sorted.
Syntax
'Declaration
 
Public ReadOnly Property SortDescriptions As SortDescriptionCollection
'Usage
 
Dim instance As DataGridControl
Dim value As SortDescriptionCollection
 
value = instance.SortDescriptions
public SortDescriptionCollection SortDescriptions {get;}

Property Value

A generic ObservableCollection of SortDescription objects that describe how the items in a grid are sorted.
Remarks
Whenever groups are created from the values of a column, those same values will automatically be sorted in ascending order; however, a SortDescription object will not be added to the SortDescriptions collection.
Example
<sldg:DataGridControl.SortDescriptions>
   <!--The "s" alias references the System.ComponentModel namespace in the the 
          System.Windows assembly
          xmlns:s="clr-namespace:System.ComponentModel;assembly=System.Windows"-->
   <s:SortDescription PropertyName="ShipCountry"/>
   <s:SortDescription PropertyName="ShipCity" Direction="Descending"/>
</sldg:DataGridControl.SortDescriptions>
 
<sldg:DataGridControl.Columns>
   <sldg:Column FieldName="Freight"                            
                SortDirection="Ascending"/>
</sldg:DataGridControl.Columns>
Requirements

Target Platforms: Windows 7, Windows Vista, Windows XP SP3, Windows Server 2008 family

See Also

Reference

DataGridControl Class
DataGridControl Members

Manipulating Data

Sorting Data

Send Feedback