繁体   English   中英

DataGridView,大规模数据绑定解决方案

[英]DataGridView, large scale databinding solutions

我开发了一个使用DataGridView的应用程序,其中可以包含多达50万行。 当前的结构如下:

DataGridView.DataSource is a BindingSource
BindingSource.DataSource = AggregateBindingListView
AggBLV.SourceLists = {Lists of Data}
AggBLV.Sort("PropertyName")
AggBLV.ApplyFilter(Predicate)
...

AggregateBindingListView是一个实现的集合:Component,IBindingListView,IList,IRaiseItemChangedEvents,ICancelAddNew,ITypedList

这是由http://blogs.warwick.ac.uk/andrewdavey开发的优秀代码。

无论如何。 我们已经使用了4年,它已成为性能瓶颈。

所以这是我的问题:

我有一个500k项的集合,并想将它们绑定到DataGridView。 我需要它具有多列排序,谓词过滤和性能优先级。

我们刚刚升级到C#4.0。

我可以做得比我现有的更好吗? 我可以发布时间统计信息等等,但是我需要一些比较信息。

您可以尝试使用此处所示的数据虚拟化。 它是为WPF设计的,但它可能在经过少量改动的WinForms中可以工作。 这样的想法是,您不必只一次将所有数据保存在内存中,而是仅根据需要加载必要的“页面”,并在不再需要它们时将其卸载。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM