Silverlight 3 Datagrid. How to access to the current sort properties
I'm using a DataGrid, which datasource is exported to Excel.
开发者_JAVA百科I'd like to shape the excel doc according to the current sorting of the DataGrid (which column, and which order).
Anyone knows how to access this information?
Thanks
solution: Use a PagedCollectionView
as a wrapper for your datasource.
If a sort is used, there will be an item in the SortDescriptions
property of the PagedCollectionView
, that will give access to the PropertyName
on which the grid is sorted, and on the sort direction.
精彩评论