The .grid data input is a query. I think that the css style is defined inside the SQLFORM class grid() method http://web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLFORM.grid
You could create the table in the way you posted and add the css reference used by grid in the tags (i.e web2py_grid and web2py_form)

