Hi Massimo, I'm wondering how apply this change, I tried with the last
version, but isn't work yet,
I thought that was implemented in gluon\sqlhtml.py line 2242...

I'm trying to call it on this way:

grid = SQLFORM.grid(....)

return dict(form=form, grid=grid, license_plate=license_plate,
summary=show_summary(summary), help=help, rows=grid.rows)

but I got this error:

Versión

web2py™Version 2.4.6-stable+timestamp.2013.04.21.19.50.11
PythonPython 2.7.3: /usr/bin/python (prefix: /usr)

Traceback

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 212, in restricted
    exec ccode in environment
  File "/home/www-data/web2py/applications/avl/controllers/reports.py",
line 426, in <module>
  File "/home/www-data/web2py/gluon/globals.py", line 194, in <lambda>
    self._caller = lambda f: f()
  File "/home/www-data/web2py/applications/avl/controllers/reports.py",
line 336, in events
    return dict(form=form, grid=grid, license_plate=license_plate,
summary=show_summary(summary), help=help, rows=grid.rows)
AttributeError: 'DIV' object has no attribute 'rows'

Error snapshot

<type 'exceptions.AttributeError'>('DIV' object has no attribute 'rows')

Thanks for your time.
Christian.

2013/4/9 Massimo Di Pierro <massimo.dipie...@gmail.com>:
> hmmmm... looks like the rows are not stored. I can easily change and allow
> you to do:
>
>
> grid = SQLFORM.grid(...)
> grid.rows = ....
>
> it would contain the records you see on the page only. Would this be ok?
> Pros/Cons?
>
>
> On Tuesday, 9 April 2013 10:12:57 UTC-5, Christian Espinoza wrote:
>>
>> Hi Massimo, I'm rendering a grid in a view and I'm need add a graph to it,
>> maybe using flot js lib
>> the graph will need the same grid data, and I'm wondering how get the row
>> data without running a query only for the graphs
>> and taking advantage from the raw data used by SQLFORM.grid()...
>>
>> Christian.
>>
>>
>>
>>
>> El martes, 9 de abril de 2013 11:14:50 UTC-3, Massimo Di Pierro escribió:
>>>
>>> I do not understand the question. :-(
>>>
>>> On Tuesday, 9 April 2013 08:38:48 UTC-5, Christian Espinoza wrote:
>>>>
>>>> Hi guys, I'm answering how can I take advantage from SQLFORM.grid in
>>>> order to get aditionally the data from the query
>>>> something like:
>>>>
>>>> SQLFORM.grid():
>>>> .
>>>> .
>>>>     return (htmlcode, rawrows)
>>>>
>>>>
>>>>  grid, rows = SQLFORM.grid(query,fields=campos,
>>>>      editable=False,
>>>>      searchable=False,
>>>>      deletable=False,
>>>>      create=False,
>>>>      details=False,
>>>>      user_signature=False,
>>>>      orderby=db_events.events.event_datetime
>>>>  )
>>>>
>>>> There are something working like that?
>>>>
>>>> Thanks in advance.
>>>> Christian.
>
> --
>
> ---
> 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/Q6bEe_rscFw/unsubscribe?hl=en.
> 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/groups/opt_out.
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to