Questions about sAjaxSource in a MVC application

Questions about sAjaxSource in a MVC application

LawsonLawson Posts: 1Questions: 0Answers: 0
edited April 2012 in DataTables 1.9
I am taking over a project from a friend that is using DataTables. I am very happy with the look and feel of the product but i do have one issue. When i have over 1000 rows in a table it takes about 30 sec to render. through my reading it looks like using sAjaxSource might be about to help this issue. Now I am now rather new to programming and sorry if this is a very easy solution.

when you reference ("scripts/server_processing.php") in the below code, what else can i reference

ex. viewmode or the controller and method name

$(document).ready(function() {
$('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "scripts/server_processing.php"
} );
} );

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > when you reference ("scripts/server_processing.php") in the below code, what else can i reference

    Anything that implements the server-side protocol requirements for DataTables: http://datatables.net/usage/server-side .

    If you are only dealing with a couple of thousand records though, I'd suggest firstly that you see if deferred rendering gives you enough of a speed boost before implementing server-side processing - see bDeferRender .

    Allan
This discussion has been closed.