且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

没有 CTRL 或 Shift 的 WPF 数据网格多项选择

更新时间:2023-12-04 13:14:28

工具包中的 DataGrid 不支持这个,看起来像 将不受支持,当 DataGrid 与 .NET 4 一起提供时.此控件尚未准备好用于生产的另一个原因.我会选择以下选项之一:

This is not supported in the DataGrid in the toolkit, and it looks like it won't be supported when the DataGrid is shipped with .NET 4 either. Yet another reason why this control is not ready for production use. I would go with one of these options:

  1. 使用 ListView/GridView 滚动您自己的网格
  2. 修改工具包中DataGrid的源代码(应该不会太难,因为已经支持扩展选择了?)
  3. 寻找任何可用的商业 WPF DataGrid(它们通常会添加大量有用的功能)

我同意 DataGrid 应该支持这一点,我认为您应该提交错误/无论如何,对此的建议.也许现在将其引入 .NET 4 还为时不晚.. :)

I agree that the DataGrid should support this and I think you should file a bug/suggestion for this anyway. Maybe it's not too late to get it into .NET 4.. :)