On 19 December 2011 12:06, Rahul <rahul.dhak...@gmail.com> wrote:

> Hi All,
>      I was just wondering if I can use the row.id or any information
> with sqlform.grid -
> Below is the link I have defined to show a button called Send Request.
> I have re-directed it to use a custom function "regstatus" that passes
> a row.id argument.
> ---code---
> links = [lambda row: A(SPAN(_class='icon plus'),'Send
> Request',_class='positive
> button',_href=URL("default","reqstatus",args=[row.id' <http://row.id>))]
>

>From earlier email on this list:
*
*

*links = [lambda row: A('Edit',_href=URL("controller","edit", *
*args=["update", tablename, a.id])) *
*and set editable, deletable, details  to False. *

*If you use jqueryui then the links are rendered as buttons. *


This is what I have used to use my own 'Edit' button:

    links = [lambda row: A('Edit' , _href = URL('default', 'edit_journal',
>                                                         args = [row.id]))]
>


> How can I achieve it?
> Secondly - The button added via link is visible to me on the view as
> well. Example if I view the record with row.id==1 it shows the Send
> Request button on this view page as well. Can we hide it?
>

Did you use 'details=False' when you activated the grid?

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

Reply via email to