Are you saying you don't want each record in an HTML table row but instead want to display each record as a card? There's no built-in way to do that, but you can hack the returned grid object and replace the HTML table with your own DOM:
def my_custom_grid_layout(rows): [code to produce the desired DOM from a DAL Rows object] grid = SQLFORM.grid(db.mytable) table_div = grid.element('.web2py_table') if table_div: table_div[0] = my_custom_grid_layout(grid.rows) You'll have to write your own code to generate the layout you want. Anthony On Wednesday, September 10, 2014 1:35:12 AM UTC-4, Luciano Laporta Podazza wrote: > > Hello, > > I would like to take advantage of SQLFORM.grid search, listing and > pagination capabilities to generate a listing from a table, but I need to > customize the resulting rows like this: > > > <https://lh3.googleusercontent.com/-TbnhU4p9EOw/VA_hxFcXi_I/AAAAAAAABYI/Ti2JNW4AdAg/s1600/Screen%2BShot%2B2014-09-10%2Bat%2B02.23.35.png> > Until now I only have this: > > users = SQLFORM.grid(db.users,fields=[db.users.id, db.users.first_name, > db.users.last_name], > headers={'users.id':'id','users.first_name':'Nombre', > 'users.last_name':'Apellido'}, > sortable=False, deletable=False, editable=False, create=False, > csv=False, formstyle="div") > > Which results into this: > > > <https://lh4.googleusercontent.com/-E7cySzUy2Bw/VA_iuQU_5CI/AAAAAAAABYQ/n5mLgALWJcs/s1600/Screen%2BShot%2B2014-09-10%2Bat%2B02.33.16.png> > I'm using Bootstrap 3. Any help will be appreciated. > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.