mysql - How to speed up the populating of listview in vb.net -
this code populating listview
for = 0 ds.tables(0).rows.count - 1 j = 0 ds.tables(0).columns.count - 1 itemcoll(j) = ds.tables(0).rows(i)(j).tostring() next dim lvi new listviewitem(itemcoll) mylvstyle.items.add(lvi) next
i tried using following:
mylvstyle.suspendlayout() code populating listview mylvstyle.resumelayout()
and
mylvstyle.beginupdate() code populating listview mylvstyle.endupdate()
i'm using mysql database , select statement:
select style_code, `desc`, fab_cons, date_creat, last_ord, qty_ord, graphic, notes1, notes2, notes3 style
but non of these me speed populating of listview. thank you.
you should keep the:
beginupdate
and
endupdate
if thats not speeding things, should faster sql server.
one little test try, fill listview same number of random items, , skip getting sql. way can pinpoint if sql bottleneck...
so like;
with mylvstyle .beginupdate() each row [rowtype] in ds.tables.rows each col [coltype] in row.colums dim newlvi listviewitem = .items.add(col.itemcoll) next next .endupdate() end
Comments
Post a Comment