Filter/Sort/Search Not Working

Filter/Sort/Search Not Working

corleone1218corleone1218 Posts: 8Questions: 1Answers: 0
edited May 2012 in General
Hello.,

Just new in using DataTables plugin, but right now I cant seem to find a way to make those functions work. Am i missing something here? Im using a raw JSON file to populate the table and seems to display right, but not for other functions. Please advice.

Here is my current code.
[code]







$(document).ready(function () {
$('#example').dataTable({
'bJQueryUI': true,
'bProcessing': true,
'bServerSide': true,
//'sAjaxSource': 'handlers/getdata.ashx?id=sample'
"sAjaxSource": 'handlers/textfile.txt'
});
});








Col1
Col2
Col3
Col4
Col5















[/code]
thank you for this plugin.

Replies

  • allanallan Posts: 65,444Questions: 1Answers: 10,870 Site admin
    > 'bServerSide': true

    Filtering is being done on the server-side - so if filtering isn't working, it suggests you server-side script isn't doing what is required of it. That isn't too surprising if you are using a text file...!

    See: http://datatables.net/usage/server-side for what is required for server-side processing.

    Allan
  • corleone1218corleone1218 Posts: 8Questions: 1Answers: 0
    Thank you Allan for the quick response, Yup, just found out that bServerSide is the culprit and when i removed it it worked well.

    You are correct, my server-side handler is not expecting any post back from the client table after initialization. Basically, bServerSide instructs the table to re-process its data in the server rather than in the client.

    Again,
    Thank you..
This discussion has been closed.