【问题标题】:Sorting doesn't work on WPF DataGrid templated columns?排序不适用于 WPF DataGrid 模板列?
【发布时间】:2011-04-03 11:03:38
【问题描述】:

我注意到排序总是不适用于 DataGrid 模板列,有什么解决方案可以解决这个问题吗?

【问题讨论】:

    标签: wpf datagrid wpfdatagrid datagridtemplatecolumn


    【解决方案1】:

    您需要在模板化的 DataGrid 列中设置 SortMemberPath="PropertyName" 属性。

    【讨论】:

    • 非常感谢您的快速回复。它工作得非常完美!
    • 请注意,这只是属性名,不是绑定表达式。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-15
    • 1970-01-01
    • 2012-11-04
    • 2014-03-02
    • 2010-12-15
    相关资源
    最近更新 更多