i have a DataGridView that i want to fill with data, the data that will be in the DataGridView are generated dynamically, there's no datable to use as binding, i use a loop and fill each row of the DataGridView on each iteration.
private void Historique()
{
int k = 0;
for(int i= this.start_his; i <= this.end_his; i++)
{
DGV.Rows.Add();
DGV.Rows[k].Cells[0].Value = "semaine " + i;
DGV.Rows[k].Cells[1].Value = TOOLS.GetMaxHebdo(this.annee_his,
i);
k++;
}
}
the function
TOOLS.GetMaxHebdo(this.annee_his, i);
take a while to respond, so i want to fill each row of the DataGridView without blocking the program and see the rows displaying one by one, is there a way to do that using a thread or something ?