No longer Filters

No longer Filters

goodideadavegoodideadave Posts: 12Questions: 2Answers: 0
edited July 2011 in General
I created a basic datatable, and the filtering/searching worked automagically. But with this definition, it seems to do the work but still shows all the original rows.
[code]
$('#UserReportRole').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": TargetUrl,
"sAjaxDataProp": "aaData",
"sScrollX": '100%',
//"sScrollXInner": "1000px",
"bScrollCollapse": true,
"bAutoWidth": false,
"sScrollY": "440px",
"bProcessing": true,
"bPaginate": false,
"bDestroy": true,
"aoColumnDefs": [
{ "mDataProp": "UserID", "sWidth": "20px", "aTargets": [0], "bUseRendered": false, "bSearchable": true,
"fnRender": function(obj) {
var str = obj.aData.UserID.toString();
return str;
}
},
{ "mDataProp": "DeleteColumn", "sWidth": "56px", "aTargets": [1], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var str = 'Delete';
return str;
}
},
{ "mDataProp": "EditColumn", "sWidth": "56px", "aTargets": [2], "bUseRendered": false, "bSearchable": false,
"fnRender": function(obj) {
var ar = [];
ar[ar.length] = "

Replies

  • goodideadavegoodideadave Posts: 12Questions: 2Answers: 0
    OK, I get it. I removed bServerSide, and the filtering behavior is back.

    Sorry for the useless questions. This is a terrific tool, and I'm still getting familiar with it. Thanks.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    With server-side processing enabled, the filtering would be done by the server - not by DataTables. See http://datatables.net/usage/server-side and also http://datatables.net/usage

    I think this is a worthy subject for a blog post sometime soon... :-)

    Allan
This discussion has been closed.