The easiest way of creating a grid is a 2 dimensional array. You didn't tell what language/game engine you plan to use but a search on arrays combined with your language of choice should give you the information you need. Treat all code examples in this answer as pseudo code- you will have to convert it, but it should illustrate the concept.
An array is basically a list of items that can be accessed by the position in the list. A 2 dimensional array works like a grid. In most languages a 2 dimensional array is represented like this:
Array[x][y]
Now you can put items in the Array at the x and y coordinate, for example place an item at coordinate 3,6 would be:
Array[3][6] = myItem;
If you want to draw a grid, it would be as easy as (suppose the grid is 20x20):
SquareSize = 10
GridSize = 20
for(x=0 to GridSize)
for(y=0 to GridSize)
if(Array[x][y].containsitem)
draw_X_Y_Item(x*SquareSize,y*SquareSize,Array[x][y])
end if
next
next
Now you wanted an isometric grid. The trick is that each odd row X is offset 0.5 * SquareSize
and the height of each row is 0.5*SquareSize
.
SquareSize = 10
GridSize = 20
for(x=0 to GridSize)
for(y=0 to GridSize)
if(Array[x][y].containsitem)
if(y%2=0) // odd or even?
draw_X_Y_Item(x*SquareSize,y*SquareSize*0.5,Array[x][y])
else
draw_X_Y_Item(x*SquareSize+0.5*SquareSize,y*SquareSize*0.5,Array[x][y])
end if
end if
next
next
If you also use this method to draw your map; you will save a lot on memory; do a search on 'tilemaps' for more information.