Adi, you had a tiny working example above
*this works:
grid=SQLFORM.smartgrid(.....*
is the data model available for that?
I'm looking for any small self-contained working example of smartgrid
redirecting to edit
thanks,
Alex
On Saturday, September 14, 2013 5:38:58 PM UTC-7, Adi wrote:
>
> Alex,
> Can you please clarify what model do you need? I can post the sample code
> but not sure what exactly do you need.
>
>
> On Fri, Sep 13, 2013 at 8:13 PM, Alex Glaros <[email protected]<javascript:>
> > wrote:
>
>> Adi,
>>
>> can you post the model for this?
>>
>> thanks,
>>
>> Alex Glaros
>>
>>
>> On Friday, December 23, 2011 9:44:17 AM UTC-8, Adi wrote:
>>>
>>> this works:
>>>
>>> grid=SQLFORM.smartgrid(db.**purchase_order, details=False,
>>> links_in_grid=True,
>>> maxtextlengths={'purchase_**
>>> order.po_number':15,},
>>> maxtextlength=30,
>>> paginate=20,
>>> sortable=True,
>>> orderby=dict(purchase_order=[~**
>>> db.purchase_order.modified_on]**, ),
>>> oncreate = dict(purchase_order=[po_**
>>> oncreation]),
>>> csv=False,
>>> ui='jquery-ui',
>>> links=dict(purchase_order=[**lambda row:
>>> A('Duplicate',
>>> _class='button',
>>> _href=URL('duplicate_purchase_**order',args=[row.id])), lambda row:
>>> A('Print',
>>> _class='button', _href=URL('print_all',args=[
>>> ro**w.id <http://row.id>]))]),
>>> user_signature=False, onupdate=auth.archive,
>>> )
>>>
>>>
>>> def po_oncreation(form1):
>>>
>>> auth.archive
>>>
>>> last_id = form1.vars.id
>>>
>>> row = db(db.purchase_order.id==last_**id).select().first()
>>>
>>> str_po_number = row.po_number + str(row.id)
>>> row.po_number = str_po_number
>>> row.update_record()
>>>
>>> #response.flash = 'Added a Purchase Order'
>>>
>>> session.flash = 'Added a Purchase Order'
>>> return
>>>
>>>
>>>
>>> --
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
--
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.