rows = db(db.products).select(orderby=db.products.name)
   table = SQLTABLE(rows)

You can sort the rows, not the table. The links in the header are just
passed back to the action and can use to make the select dependent on
them.

You can also use

  table = SQFORM.grid(db.products)

and you get everything you want and more (pagination, search, etc)

On Oct 12, 8:20 am, horridohobbyist <horrido.hobb...@gmail.com> wrote:
> I'm using SQLTABLE in a view and I'm specifying 'orderby' to add
> sortable column headers, eg,
>
> orderby=db.products.name
>
> I have the linkable column headers, but when I click on them, NOTHING
> changes. The order of the rows remain the same.
>
> So, what am I missing here? Shouldn't this "just work"?
>
> Thanks,
> Richard

Reply via email to