Hi All,
I have 5000 records in my datatable. I will do some processing on each row.I want to show the progess in progress bar.
How will I go for it?
I have writen some code. But it is not doing exactly I wanted..Please check it once...
progressBar1.Minimum = 0;
progressBar1.Maximum = ds.Tables[0].Rows.Count;
progressBar1.Step = 1;
for (int count = 0; count < ds.Tables[0].Rows.Count; count++)
{
progressBar1.PerformStep();
progressBar1.Refresh();
DataRow dr = Dt.NewRow();
for (int ColCount = 0; ColCount < 60; ColCount++)
{
if (ds.Tables[0].Rows[count][ColCount].ToString().Length > 2)
{
///some task...
}
else
{
dr[ColCount] = string.Empty;
}
}
Dt.Rows.Add(dr);
}
Any reply is appreciated.
Thanks,
Dipankar