smartgrid 'searchable' options

46 views
Skip to first unread message

Peter Gibson

unread,
May 28, 2015, 1:16:59 AM5/28/15
to web...@googlegroups.com
Hopefully a simple question...

I have a smartgrid on a table which contains a lot of fields that are only for internal use of the application and are of no direct interest/relevance to the user.

When I set searchable=True in the smartgrid then it allows searching on all these fields which is not what I want.

How do I restrict which fields the user can search on (e.g. just allow searching on 'title' and 'description')?  It hints this is possible in the docs (http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=searchable) but there is no detailed reference that I can find.

Many thanks

Peter

Dave S

unread,
May 28, 2015, 2:29:54 PM5/28/15
to web...@googlegroups.com

Aside from the searchable issue, how are you controlling what fields are displayed?  AIUI, there's a  couple of different ways of doing that, and one of those may work better for your usage.

/dps

Ron Chatterjee

unread,
May 28, 2015, 3:33:33 PM5/28/15
to web...@googlegroups.com
On that note,  can we specify "permission" to view, edit and/or delete. In other words, only some people will have access to delete (membership) but everyone can see. 

I can always put them on a table to do them separately but just asking if these can be done using grid as well. I don't see that listed.

Ron Chatterjee

unread,
May 28, 2015, 3:48:03 PM5/28/15
to web...@googlegroups.com
I guess we need to set the permission a layer above and then call the grid like massimo explained in his video. 

Peter Gibson

unread,
May 30, 2015, 12:36:21 PM5/30/15
to web...@googlegroups.com
I am using the fields= parameter.
Reply all
Reply to author
Forward
0 new messages