开发者

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

开发者 https://www.devze.com 2023-02-10 18:21 出处:网络
I have a RadGridView control in asilverlight project and would like to have the grid come up sorted by the name column. I tried placing the attribute S开发者_如何学CortingState=\"Ascending\" on the co

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 S开发者_如何学CortingState="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?


You will want to add a SortDescriptor to the grid

<telerik:RadGridView.SortDescriptors>
    <telerik:SortDescriptor Member="Name" SortDirection="Ascending" />
</telerik:RadGridView.SortDescriptors>


Also, what about the 'ColumnSortDescriptor'?

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

There are examples and code there.

0

精彩评论

暂无评论...
验证码 换一张
取 消