ListView listView1 = new System.Windows.Forms.ListView();
listView1.View = System.Windows.Forms.View.Details;
listView1.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(listView1_RetrieveVirtualItem);
List<string> list1 = new List<string>();
List<string> list2 = new List<string>();
listView1.VirtualListSize = _itemCount;
private void listView1_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e)
{
e.Item = new ListViewItem(list1[e.ItemIndex], 0);
e.Item.SubItems.Add(list2[e.ItemIndex]);
}
ListView虚拟模式加载数据 提高加载速度
最新推荐文章于 2016-03-13 09:25:03 发布