@Sebastian, @pbreit,
I understand what you mean to say.
If I get you rightly, I should fetch only a limited no. of rows
through pagination.
It makes sense for most of the situations.
But for some cases, rendering all the records on single page is
required.
e.g. consider a big automobile workshop.
A report for spare parts price list (with >12,000 parts) is to be
viewed.
For the customer, using pagination & clicking "next", "next",... is
unsuitable.
After rendering the total parts on single page, he/she may apply a
desired filter and analyze the data.
On Jun 21, 9:50 pm, "Sebastian E. Ovide" <sebasti...@gmail.com>
On 06/21/2011 08:26 PM, Vineet wrote:
> @Sebastian, @pbreit,
> I understand what you mean to say.
> If I get you rightly, I should fetch only a limited no. of rows
> through pagination.
> It makes sense for most of the situations.
>
> But for some cases, rendering all the records on single page is
> required.
> e.g. consider a big automobile workshop.
> A report for spare parts price list (with>12,000 parts) is to be
> viewed.
> For the customer, using pagination& clicking "next", "next",... is
trydef get_data():
custdata = db.executesql(qry, as_dict=True)
return response.json(custdata.as_list())
I tried doing like this:--
In controller--
def get_data():
custdata = db.executesql(qry, as_dict=True)
return response.json(custdata)
And in View,
....other code is as earlier (hence omitted)
"sAjaxSource": "{{=URL('MIS','get_data')}}",
Still, the dataTable is blank.
Pl. help.
---Vineet
> On Jun 22, 1:51 am, "contatog...@gmail.com"
a='MyWheels', c='MIS', f='get_data'.
So, {{=URL('MIS','get_data')}} should work.
But I do not get the data in dataTable.
---Vineet
> > > On Jun 22, 1:51 am, "conta...@gmail.com"
What happens if you go to /MyWheels/MIS/get_data? Do you get the proper JSON returned? If so, then the problem is probably in your client-side JS code. Also, on the client side, check in Firebug (or similar) to see if the Ajax call is getting made properly, and if it is returning the JSON. You may need to work on debugging the client-side JS/DataTables code.Anthony
On Saturday, June 25, 2011 10:57:23 PM UTC-4, Vineet wrote:
a='MyWheels', c='MIS', f='get_data'.
So, {{=URL('MIS','get_data')}} should work.
But I do not get the data in dataTable.
---Vineet
> > > On Jun 22, 1:51 am, "cont...@gmail.com"