How to use backgroundWorker in C#?
hi experts, need here, need display progress bar while exporting data datagridview excel sheet. , when finished, display “completed” or that, confirmed done. decide use backgroundworker progress bar cope situation. i’m lost on how use backgroundworker in situation. , until now, still not find example job. here in code, code reading data datagridview , export excel. can me show me , how used backgroundworker in situation?
here code:
dataset dset = new dataset();
dset.tables.add();
for (int = 0; <= datagridview1.columncount - 1; i++)
{
dset.tables[0].columns.add(datagridview1.columns[i].headertext);
}
datarow dr1 = null;
for (int = 0; <= datagridview1.rowcount - 1; i++)
{
dr1 = dset.tables[0].newrow();
for (int j = 0; j <= datagridview1.columns.count - 1; j++)
{
dr1[j] = datagridview1.rows[i].cells[j].value;
}
dset.tables[0].rows.add(dr1);
}
thanks in advance…
updating datagrid backgroundworker
http://stackoverflow.com/questions/2505508/updating-datagrid-from-a-backgroundworker
regards,
narendran ponpandiyan
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment