| | 40 | response should be sent in tbhis format: |
| | 41 | {{{ |
| | 42 | aaData": [ |
| | 43 | [row1.field1.value, row1.field2.value, row1.field3.value], |
| | 44 | [row2.field1.value, row2.field2.value, row2.field3.value] |
| | 45 | ] |
| | 46 | }}} |
| | 47 | e.g. using a function like: |
| | 48 | {{{ |
| | 49 | def callback(): |
| | 50 | print request.vars |
| | 51 | from gluon.serializers import json |
| | 52 | query = .... |
| | 53 | rows = db(query).select() #<<< |
| | 54 | r=dict(rEcho=1, |
| | 55 | iTotalRecords=len(rows), |
| | 56 | iTotalDisplayRecords=len(rows), |
| | 57 | aaData=[[row.field1,row.field2] for row in rows]) |
| | 58 | return json(r) |
| | 59 | }}} |
| | 60 | If you print request.vars you can easy figure out what paramers are being passed and change the <<< line accordingly. |