The first argument to smartgrid should be a table, not a query. If you want
to specify constraints, use the "constraints" argument, which is a
dictionary specifying constraint queries for each tablename:
SQLFORM.smartgrid(db.call_log, constraints=dict(call_log=query), ...)
Anthony
On Tuesday, May 14, 2013 1:29:35 AM UTC-4, Pawan Jha wrote:
>
>
> Hi all Please let me know why this is giving error as i need to query the
> table as the value comes with the query string
>
>
> field =
> [db.call_log.call_datetime_from,db.call_log.incident_street_no,db.call_log.incident_house_no]
>
>
> page = request.args(0)
> query = db.call_log.incident_Id == page
> # == page
> #db.define_table('call_log',Field('incident_Id'),auth.signature)
> query = db.call_log.incident_Id==page
> table= SQLFORM.smartgrid(query,
> user_signature=True,
> fields=field,
> deletable=False,
> editable=False,
> details=False,
> #selectable = lambda ids: clubCall(ids),
> #field_id=None,
> csv=False,
> paginate=20,
> #showbuttontext=False,
> searchable=False,
> #create=False,
> oncreate=None,
> onupdate=None,
> ondelete=None,
> )
> #formargs={},
> #createargs={},
> #editargs={},
> #viewargs={},
> #buttons_placement = 'right',
> #links_placement = 'right',
> #ignore_rw = False,)
> #query = (db.call_log.incident_Id >0).select()
>
--
---
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.