grid = SQLFORM.grid(query,
    links = [
        lambda row: 'returns a button',
        lambda row: 'returns another button',
        ]
    )if 'view' in request.args:
    links = []
else:
    links = [lambda, lambda, lambda]
I have a grid with some links. One of the buttons is a placeholder which some Jquery attaches to. How do I stop this button from appearing in the subforms add, view etc.
I don't really want or need any of the links to appear in the subforms.
links = [
lambda row: 'returns a button',
lambda row: 'returns another button',
]
)
The only thing I can think of is something like this before the grid and the links = links in the grid:
links = []
else:
links = [lambda, lambda, lambda]Is there something already in the SQLFORM.grid which can do this?
--
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 web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/FcnXZz5dRqo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
if request.args(-3) in ('edit', 'view'):
    links = []else:    links = ['the many lambdas']
grid = SQLFORM.grid(    query, 
    editable = True, 
    details = True, 
    create = True, 
    links = links,    )