Hi!
I'm trying to render this following query with a grid:
tab = <mytable>
orderby = [tab[f] for f in ('municipio', 'quartiere', )] + [~tab['den_tot']]
fields = [tab[f] for f in ('municipio', 'quartiere', 'desvia', 'den_tot',
        'den_predatori', 'den_dann', 'den_confl', )]
query = db(db.vista).select(*fields, groupby=fields, orderby=orderby, limitby=(0,20))

using this code:

grid = SQLFORM.grid(tab,
    fields = fields,
    field_id = tab.id,
    orderby = orderby,
    groupby = fields,
    deletable = False,
    editable = False,
    create = False,
    paginate = 20
)

but rendering the two objects I obtain different results:
1) the grid is not paginated but the dynamic table contains all the records
2) the results in the grid are not grouped

is there something wrong in the grid code?

thank you very mutch in advance.

Cheers

    Manuele

--



Reply via email to