sir, actually at the time of
retrieving your data back you can't as it is unknown how much time it will take (depends on database). But at time of filling you can do so like this
Progressbar1.Maximum = Dt.Rows.Count;
for(int i=0;i<dt.rows.count;i++)>
{
Progressbar1.Value = i + 1;
}