开发者

Silverlight 3 Datagrid. How to access to the current sort properties

开发者 https://www.devze.com 2023-01-25 17:59 出处:网络
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).

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.

0

精彩评论

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