C#快速将数据添加到ListView控件 [英] C# quickly add data to the listview control

查看:689
本文介绍了C#快速将数据添加到ListView控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,如何快速将数据添加到listview控件中.当需要添加大量数据时,它非常慢,例如需要添加10,000行数据.谢谢.

In C#,how to quickly add data to the listview control.When a large amount of data need to add,It''s very slow,Such as the need to add 10,000 rows of data.Thank you.

add a sentence.I use it in windows forms.

推荐答案

我认为用户不需要一次看到这么多行.无论如何,这么多行都不会放在计算机屏幕上.您需要使用ListView.VirtualMode属性虚拟化ListView控件(我不知道您使用的是哪个库,但是想法是一样的).这样,数据将按需要以较小的部分馈送到控件.更好的是,您可以提供部分数据来响应搜索查询.

与使用数据填充控件的操作的性能有关,了解数据绑定.

再次,您需要自己查找更多详细信息,因为您没有标记要使用的UI库.

—SA
I don''t think the user need to see so many lines at once. So many rows won''t feet on a computer screen anyway. You need to virtualize ListView control by using ListView.VirtualMode property (I don''t know what library you''re using, but idea would be the same). In this way, the data will be fed to the control on demands in smaller portions. Better yet, you could provide part of data in response to search query.

In relationship to the performance of the operations of population the control with data, learn about data binding.

Again, you need to find further details by yourself, as you did not tag the UI library you use.

—SA


这篇文章对您有帮助吗?

更易于使用的ListView [
Would this article help you?

A Much Easier to Use ListView[^]

Good luck :)


http://msdn.microsoft.com /en-us/library/bb398790.aspx [ ^ ]

看看这个链接.很好.
http://msdn.microsoft.com/en-us/library/bb398790.aspx[^]

Have a look in this link. Its a good one.


这篇关于C#快速将数据添加到ListView控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆