How do I add a button "Add a comment!" in every row of a grid? It's a kind
of virtual column.
The below works, it takes user exactly to the correct row in the next
table, but I use up one of the fields (Idea.id). How do I just create
text/virtual column that doesn't sacrifice existing field?
def view_all_suggestions_and_comments():
db.Idea.id.represent = lambda id, r: A('Add a comment!',
_href=URL('comment_on_a_suggestion', vars=dict(filter=id)))
query = (db.IdeaComment.ideaID==db.Idea.id) &
(db.IdeaComment.partyID==db.Party.id)
grid = SQLFORM.grid(query)
return dict(grid = grid)
I read the book but need exact syntax for this situation.
Thanks,
Alex Glaros
--
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/groups/opt_out.