开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜