Hi,
Why are you calling select statement each and every loop, instead of that use "IN" operator and call the listed people and store that information in one DataTable and display the same in your DataGrid.
EX:
string str="";
for(int i=0; i <=9; i++)
{
str=str+","+Convert.Tostring(i);
}
str=str.Remove(0);
Now, wrote your select statement like below
select * from tablename where Id IN ( str );
and store that result into one DataTable and bind that DataTable into your DataGridView.
Hope this will helpful to you...