I am new in WPF and I need to make a datagrid of 1000 columns by 1200 rows. Is it possible? Any al开发者_运维技巧ternative other than the datagrid? I need to represent a table (Excel) of these features in my application. thanks
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.
<wpftoolkit:DataGrid ItemsSource="{Binding}" VirtualizingStackPanel.IsVirtualizing="True" />
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).
精彩评论