Hi all
I’m having problems trying to tailor the grid to my needs
I've set up a grid to query my db and it retrieves the data successfully,
great!
Example: def gridquery():
grid = SQLFORM.grid((db.MAIN.TaxonID == db.TAXON.TaxonID), field_id =
db.MAIN.MainID, fields=[db.TAXON.TaxonName, db.TAXON.CommonName,
db.TAXON.TaxonomicPhylum])
return locals()
However, the search box contains all of the columns in all of the connected
tables. I want to limit the searches only to the fields i have specified
e.g. 'fields=[db.TAXON.TaxonName, db.TAXON.CommonName,
db.TAXON.TaxonomicPhylum])'.
1. I've tried to do a few things i.e. setting the unwanted search
fields to 'writable = False & readable = False'
2. also tried this method [setattr(f, 'readable', False) for f in
mydb if f.name not in ('mydb.field')]
However, this limits the query results - i want to include all the tables
fields in the query results, just not in the searches.
Does anyone have any suggestions? As I understand I might need to build a
custom widget, at my current level this seems rather complicated, are there
any simpler work arounds.
Thanks!
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.