Re: [web2py] removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-12 Thread Paul Ellis
@Sandeep
That will disable the view, edit, create forms completely. I want to use
the forms. I just don't want the extra buttons (links) which I use in the
grid to appear in these forms.

On Wed, Dec 12, 2018 at 6:23 AM sandeep patel 
wrote:

> @Paul,
> You can do this way,
> grid = SQLFORM.grid(query,  editable=False,details=False,create=False,..)
>
> Thanks
> SP
>
>
> On Wed, Dec 12, 2018 at 4:40 AM Paul Ellis  wrote:
>
>> 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.
>>
>> grid = SQLFORM.grid(query,
>> 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:
>> if 'view' in request.args:
>> 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+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-11 Thread sandeep patel
@Paul,
You can do this way,
grid = SQLFORM.grid(query,  editable=False,details=False,create=False,..)

Thanks
SP


On Wed, Dec 12, 2018 at 4:40 AM Paul Ellis  wrote:

> 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.
>
> grid = SQLFORM.grid(query,
> 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:
> if 'view' in request.args:
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-11 Thread Paul Ellis
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.

grid = SQLFORM.grid(query,
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:
if 'view' in request.args:
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.