How are you drawing the grid? On what platform? Generally, a grid is simply lines going horizontally and vertically to form a nice set of squares. If the grid is square (like for checkers), you can do this by drawing lines both horizontally and vertically at the same time. Something like this:
const int cellsize = 20; // 20 pixels wide/high cells.
void grid(int gridsize)
for(i = 0; i < size; i++)
DrawLine(0, i * cellsize, size * cellsize, i * cellsize);
DrawLine(i * cellsize, 0, i * cellsize, size * cellsize);