I need to quickly fill a datagridview but there are over 10,000 records.
What is the best paging solution to use in cases like these ? Should I use a backgroundworker ?
Printable View
I need to quickly fill a datagridview but there are over 10,000 records.
What is the best paging solution to use in cases like these ? Should I use a backgroundworker ?
Paging implies not retrieving all the data until it's needed, i.e. a page at a time. The DataGridView has a VirtualMode property. You should read the documentation for that to see how it's done and whether that's what you actually want.
Thank you very much for the pointers. Virtual mode with just-in-time loading seems suitable.
Is it then necessary to use a backgroundworker to load the datagridview ?
Nope. The idea is that you only load one page of data at a time, so each individual page loads quickly, instead of loading all the data in one go, which would take longer.Quote:
Originally Posted by Xancholy