Best way to mass-po...
 
Notifications
Clear all

Best way to mass-populate data?

0 Posts
1 Users
0 Likes
122 Views
0
Topic starter

I am looking at populating a dataview with 10,000 or more rows at once.

Currently I AddRow one at a time with the values for each cell populated. But it begins to become very slow after a few thousand rows.

AddRows seems like a wonderful choice - but I am a little confused on it's operation. Titles() (and RowTags() ) implies a one-to-one relationship and each entry in Titles() is one row; so if I have 20 columns on the dataView, how would the Titles() parameter of AddRows work? Does that only add a value to the first column's cell of each added row?

I have tried switching to populating 10k rows with no data (an Titles being an array of empty strings, one per row, and a RowTags() of integer, and only populating the cells on RowWillRender based on an object corresponding to the rowtag, but that seems to throw off sorting, as the sort is called before the cell values are all populated, causing strange behavior.

Ideally it seems like AddRows' Titles() would somehow allow for all 20 columns for each row to be populated (an array of arrays perhaps?).

What is the recommended way for populating 10,000+ rows at once with data in a reasonable speed?

Thank you for any assistance.