how do I set a column to be the default sort column with Telerik RadGridView in Silverlight
Asked Answered
C

2

17

I have a RadGridView control in a silverlight project and would like to have the grid come up sorted by the name column. I tried placing the attribute SortingState="Ascending" on the column definition for the name. I do not see any other attributes that might accomplish this. Does anyone know how to make this happen?

Casares answered 16/2, 2011 at 21:56 Comment(0)
N
27

You will want to add a SortDescriptor to the grid

<telerik:RadGridView.SortDescriptors>
    <telerik:SortDescriptor Member="Name" SortDirection="Ascending" />
</telerik:RadGridView.SortDescriptors>
Numb answered 16/2, 2011 at 22:2 Comment(0)
U
1

Also, what about the 'ColumnSortDescriptor'?

http://demos.telerik.com/silverlight/#GridView/Sorting

There are examples and code there.

Unremitting answered 16/1, 2012 at 15:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.