Search Posts

web2py grid vs. smartgrid

The web2py SQLFORM.grid and SQLFORM.smartgrid controls sound like one should be a subset of the other, but they aren’t.

web2py grid vs. smartgrid: Similarities

  • Both the grid and smart grid controls can browse, search, sort, create, update and delete records.
  • Both can accept a table as the first parameter

web2py grid vs. smartgrid: Differences

Here’s a summary of important differences.

The web2py grid

  • First argument: Table or query

The web2py smartgrid

  • First argument: Table only (not query)
  • Can show linked tables
  • Shows breadcrumbs
  • Has a linked_tables argument that lets you determine which fields show hotlinks to related tables