Creating a grid of a database table