Initially, I had created my Windows application so that my datagrid's source
would be updated once the method that filled the table was finished:
private void btn_run_Click(object sender, System.EventArgs e)
{
...
myTable = Match.fillTable();
datagrid.datasource = myTable;
}
public DataTable fillTable ()
{
...
for (int i=0; i<10000;i++)
{
//Creates row and adds it to my datatable myTable
}
return myTable;
}
The user wouldn't see anything in the grid for about 2-3 seconds but that
was an acceptable amount of time. But now, instead of a 10,000 row loop,
it'll be a loop of 400,000+ rows (about 1.5 minutes that user will be
staring at blank grid) . We already know that it displays the 400,000 rows
in the grid but I'd like to be able to update the grid every 10,000 rows so
the user can scroll through the grid while the table's filling up in the
background.
How would I have to modify the code?
Any help is appreciated.
Thanks.