You might be able to pull this one off with a GridView control directly, or make a dataTable dynamically and then set the table as the gridviews data source. This would be the general idea...
declare a dataTable
declare a data row
while (reading Database)
{
for (int i=0; i < 5; i++)
{
}
}
There are a lot of examples floating around on dynamically adding rows to a data table out there that might be able to help