I haven't tested any of this -- I would need a little time to put something 
together, but I would attack the problem like this:

1. Create a Table object with appropriate fields and set migrate=False 
(This creates a dummy table) 
2. Convert row values into a list of tuples
3. Use db._adapter.parse to create a DAL Rows object using the dummy table:

t_rows = db._adapter.parse(rows, fields=[f for f in db.dummy_table], 
colnames=db.dummy_table.fields)


4. Create a SQLFORM.grid in controller and then replace the rows with your 
rows object using the DOM parser.

grid = SQLFORM.grid(db.dummy_table)
table = grid.element('.web2py_table')
table[0] = t_rows


On Thursday, September 10, 2015 at 6:50:49 PM UTC-4, Luis Valladares wrote:
>
> Well, that sounds like a big mess of db i/o, i think it will be better to 
> use javascript. Maybe this can be put in a "wish list" for future 
> development in web2py?
>
> Thanks for your help!
>
> El jueves, 10 de septiembre de 2015, 18:03:01 (UTC-4:30), Leonel Câmara 
> escribió:
>>
>> Well there is, but, it's not pretty. You could create a DAL instance 
>> using sqlite mem, then you put everything you get from the service there, 
>> then you send a query in that DAL instance to the grid.  
>>   
>> Frankly, this is not a good idea and you'll probably run into problems, 
>> you're better off using one of the many javascript grid options.
>>
>> Here are some options:
>>
>> http://handsontable.com/
>> https://github.com/tonytomov/jqGrid/tree/master
>> http://datatables.net/
>>
>> Or really just make it yourself it's really easy with stuff like 
>> ractivejs or similar.
>>
>

-- 
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.

Reply via email to