J
João Santa Bárbara
Hi all
i have a datatable with 2500 records, and i want to fill a listview,
my problem is that it take too much time to load them all. is anytihing i
could do to
improve my performançe..... ????
it take about 45 seconds with 2500, i need to put at least 10000 in few
seconds ...
See my code below perhaps you can help ..
thks
JSB
Me.lvwAvailable.Sorting = SortOrder.None
Dim iNum As IEnumerator = Me.DataSet.Contacts.Rows.GetEnumerator
While (iNum.MoveNext)
itm = Me.lvwAvailable.Items.Add(iNum.Current("ContactID"))
itm.SubItems.Add(IIf(iNum.Current("ContactName") Is
System.DBNull.Value, "", iNum.Current"ContactName")))
Application.DoEvents()
End While
i have a datatable with 2500 records, and i want to fill a listview,
my problem is that it take too much time to load them all. is anytihing i
could do to
improve my performançe..... ????
it take about 45 seconds with 2500, i need to put at least 10000 in few
seconds ...
See my code below perhaps you can help ..
thks
JSB
Me.lvwAvailable.Sorting = SortOrder.None
Dim iNum As IEnumerator = Me.DataSet.Contacts.Rows.GetEnumerator
While (iNum.MoveNext)
itm = Me.lvwAvailable.Items.Add(iNum.Current("ContactID"))
itm.SubItems.Add(IIf(iNum.Current("ContactName") Is
System.DBNull.Value, "", iNum.Current"ContactName")))
Application.DoEvents()
End While