This is a migrated thread and some comments may be shown as answers.

Declarative Initial Sort

1 Answer 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex Peachey
Top achievements
Rank 1
Alex Peachey asked on 30 Jan 2009, 09:05 PM
I see there are descriptions in the docs/examples on how to do a programmatic initial sort. Is there a way to do a declarative initial sort?
I can't seem to get that to work.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Feb 2009, 06:54 AM
Hello Alex,

Here is an example:
<telerik:RadGridView> 
  <telerik:RadGridView.SortDescriptions> 
     <cm:SortDescription PropertyName="ProductID" Direction="Descending" /> 
  </telerik:RadGridView.SortDescriptions> 
</telerik:RadGridView> 

where "cm" is:
<Window x:Class="WpfApplication1.Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    xmlns:cm="clr-namespace:System.ComponentModel;assembly=WindowsBase" 
    Title="Window1"
 


All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Alex Peachey
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or