对自动筛选内容进行排序 - XCeed WPF Datagrid
我在应用程序中使用 Xceed WPF Datagrid。我已在其中一列上启用自动筛选,但内容未排序。我不知道是否有一个属性或其他东西,也许是一种样式,可以告诉它按字母顺序排序。有人有这方面的经验吗?
不幸的是,当我用谷歌搜索,甚至在 Xceed 的网站上搜索时,与排序相关的所有内容都是通过单击列标题对行进行排序。但我希望对自动过滤器下拉列表中的选项列表进行排序...
谢谢, 纳撒尼尔·D·霍尔科姆
I am using an Xceed WPF Datagrid in an app. I have enabled Autofilter on one of the columns, but the contents are not sorted. I can't figure out if there is a property or something, a style perhaps, to tell the thing to sort alphabetically. Has anyone had any experience with this?
Unfortunately, when I google search, or even search on Xceed's website, everything related to sorting is sorting the rows by clicking a column header. But I want the list of options in the autofilter dropdown to be sorted...
Thanks,
Nathaniel D. Holcomb
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在代表您的列的 ItemProperty 上设置 DistinctValuesSortComparer 属性,并在比较器中进行自定义排序。
我相信他们的示例应用程序中有这套。
例如:
C#
XAML
You can set the DistinctValuesSortComparer property on the ItemProperty that represents your column and do your custom sorting within the comparer.
I believe they have this set in their sample application.
For example:
C#
XAML