WPF:DataGrid:1000 列 x 1200 行
我是 WPF 新手,需要制作一个 1000 列 x 1200 行的数据网格。 是否可以? 除了数据网格之外还有其他选择吗?我需要在我的应用程序中表示这些功能的表格(Excel)。 谢谢
I am new in WPF and I need to make a datagrid of 1000 columns by 1200 rows.
Is it possible?
Any alternative other than the datagrid? I need to represent a table (Excel) of these features in my application.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有为 wpf 数据网格使用这么多行和列,但我认为尽管存在性能和加载问题,但还是可行的。
假设您的列数是固定的,您可以尝试一下,前提是:
1. 您为数据网格的行和列启用了 UI 虚拟化。
2.您的数据网格(如果存在于像stackpanel这样的控件中)具有固定的宽度和高度(即没有将它们设置为自动)。否则虚拟化将会失败。
您可能还想考虑数据虚拟化。
相关:
WPF 数据网格和虚拟化:http://social.msdn.microsoft.com/Forums/en-SG/wpf/thread/9ea28468-5505-4e28-8220-e216b77ecf28
数据网格性能:WPF 数据网格性能
数据虚拟化和 UI 虚拟化:http://blogs.microsoft.co.il/blogs/tomershamam/archive/2009/09/06/ui-virtualization-vs-data-virtualization.aspx
PS:如果您想要类似 excel 的功能,您还可以考虑自动化/嵌入 excel 本身(需要在客户端计算机上安装 excel)。
Haven't used so many rows and columns for a wpf datagrid, but I guess doable although with performance and loading issues.
Assuming your number of columns as fixed, you can give it a try, provided:
1. you have UI virtualization enabled for datagrid for both rows as well as columns.
2. your datagrid's (if present in a control like stackpanel), has a fixed width and height (i.e. doesn't have them as Auto). Otherwise the virtualization would fail.
You may also want to think about data virtualization.
Related:
WPF Datagrid and virtualization: http://social.msdn.microsoft.com/Forums/en-SG/wpf/thread/9ea28468-5505-4e28-8220-e216b77ecf28
Datagrid performance: WPF Datagrid Performance
Data Virtualization and UI Virtualization: http://blogs.microsoft.co.il/blogs/tomershamam/archive/2009/09/06/ui-virtualization-vs-data-virtualization.aspx
PS: If you want excel like capabilities, you may also think about automating/embedding excel itself (would need excel to be installed on client machines).