Virtual Scrolling: no scroller displayed (I am using web2py)

Virtual Scrolling: no scroller displayed (I am using web2py)

d_vineetd_vineet Posts: 19Questions: 0Answers: 0
edited June 2011 in General
Hi Allan & the dataTables Team !
First of all, 'kudos' for your excellent work of 'dataTables' & 'virtual scrolling'.
It would be great if I can use this for my work.
I am using web2py.
Trying to render huge amount of data from MySQL database into dataTable with Virtual Scrolling plugin.

My queries are---
1) No scroll bar is visible; i.e. virtual scrolling is not in action.
I need virtual scrolling when a large no. of rows are to be displayed.
2) Searching is not working (after keying-in some characters, nothing happens; the table stays as it is).
(I have downloaded the latest dataTables 1.8 version and using it for my project)

[Code]

$(document).ready(function() {
var oTable = $('.smarttable').dataTable( {
"sScrollY": "200px",
"sAjaxSource": "{{=URL('MIS','get_rows')}}",
"sDom": "frtiS",
"bDeferRender": true
} );
} );

[/Code]

My 'get_rows' method returns a JSON object like this:---
{"aaData": [ ["a", "b", etc.], ["c", "d", etc.] ],
"sEcho":(I gave a hardcoded value of 3),
"iTotalRecords": (no. of rows from database),
"iTotalDisplayRecords": (I have given this = iTotalRecords)
}

Note:- I validated the JSON output in jsonlint.com
It is valid JSON.

Regarding additional params---
"sEcho": (I did not understand from docs. It is given as hardcoded 3 in docs) ,
"iTotalRecords": "Understood. It is the records count from MySQL table ",
"iTotalDisplayRecords": (I have given this = iTotalRecords),

Whether "Virtual Scrolling not working" is because these parameters are wrongly given?
or due to any other missing parameter?
Can somebody pl. help me understand these things?

Thanks in advance,
Vineet

Replies

  • d_vineetd_vineet Posts: 19Questions: 0Answers: 0
    edited June 2011
    Can anybody pl. peep into my problem?
    Thanks in advance.
This discussion has been closed.