[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2014-01-21 Thread Anthony
> > links=[lambda row: A('View',_href=URL('view',args=[db.products,row.id]))], > First, note that the URL function produces a string, so putting db.products in args is equivalent to str(db.products), which will result in just "products". > def view(table,id): > return dict() > As noted

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2014-01-21 Thread horridohobbyist
Ah, I think I know! The arguments are passed in request.args. Right? On Tuesday, 21 January 2014 08:00:19 UTC-5, horridohobbyist wrote: > > Yes, I did. But I shouldn't have included arguments in the 'view' > function. That was the error. > > So how do I extract the arguments 'products' and '11'

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2014-01-21 Thread horridohobbyist
Yes, I did. But I shouldn't have included arguments in the 'view' function. That was the error. So how do I extract the arguments 'products' and '11' (in my example) in the view function? response._vars apparently does not contain them. Thanks. On Tuesday, 21 January 2014 01:35:52 UTC-5, Johan

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2014-01-20 Thread Johann Spies
Did you create a function 'view' in the default controller? Regards Johann On 21 January 2014 06:44, horridohobbyist wrote: > I can't get this to work. I'm new to web2py. Perhaps I don't understand > the argument-passing mechanism... > > In SQLFORM.grid, I have: > > links=[lambda row: A('View

[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2014-01-20 Thread horridohobbyist
I can't get this to work. I'm new to web2py. Perhaps I don't understand the argument-passing mechanism... In SQLFORM.grid, I have: links=[lambda row: A('View',_href=URL('view',args=[db.products,row.id]))], In the default controller, I have: def view(table,id): return dict() I get the foll

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-12-21 Thread Adnan Smajlovic
Great. works perfect! Thanks a lot. On Tue, Dec 20, 2011 at 10:14 PM, Cliff wrote: > You can learn more here: > > > http://web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-(experimental) > > On Dec 20, 8:57 pm, Jim Steil wrote: > > Yes, you can pass a list of the tables

[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-12-20 Thread Cliff
You can learn more here: http://web2py.com/books/default/chapter/29/7#SQLFORM.grid-and-SQLFORM.smartgrid-(experimental) On Dec 20, 8:57 pm, Jim Steil wrote: > Yes, you can pass a list of the tables you want to display through the > linked_tables parameter. > > grid = SQLFORM.smartgrid(db.custome

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-12-20 Thread Jim Steil
Yes, you can pass a list of the tables you want to display through the linked_tables parameter. grid = SQLFORM.smartgrid(db.customer, linked_tables=['note', 'order']) Then it will only include buttons for the tables you've listed. -Jim On 12/20/2011 7:08 PM, Adi wrote: is it possible to

[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-12-20 Thread Adi
is it possible to remove some of the related tables' buttons?

[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread apple
If you use jqueryui then the links are rendered as buttons. On Oct 6, 1:42 pm, Javier Pepe wrote: > Hello > > Along with the question of Johann, you can add new buttons to the grid > / SmartGrid, because the links are render as links, and not as > buttons. > > Thanks > > > > > > > > On Thu, Oct 6

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread Javier Pepe
Hello Along with the question of Johann, you can add new buttons to the grid / SmartGrid, because the links are render as links, and not as buttons. Thanks On Thu, Oct 6, 2011 at 9:36 AM, apple wrote: > You can add your own buttons using: > > links = [lambda row: A('Edit',_href=URL("controller"

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread Johann Spies
On 6 October 2011 14:36, apple wrote: > You can add your own buttons using: > > links = [lambda row: A('Edit',_href=URL("controller","edit", > args=["update", tablename, a.id])) > > and set editable, deletable, details to False. > > > Thanks! Johann -- May grace and peace be yours in abundan

[web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread apple
You can add your own buttons using: links = [lambda row: A('Edit',_href=URL("controller","edit", args=["update", tablename, a.id])) and set editable, deletable, details to False. On Oct 6, 12:48 pm, Johann Spies wrote: > How do I override the views/controllers  triggered by the buttons  menti