fnServerParams

fnServerParams

genialgenial Posts: 9Questions: 0Answers: 0
edited November 2011 in DataTables 1.8
Hi,
I have been using DataTables 1.8, i have a problem with fnServerParams,
This is my Code:
[code]
$('#tableReport').dataTable( { "bProcessing": true
, "bServerSide": true
, "bAutoWidth": true
, "bLengthChange": false
, "sScrollX": newWidth.toString() + "px"
, "sScrollY": gridHeight.toString() + "px"
, "iDisplayLength": numberOfRows
, "sAjaxSource": "/Reports/DataTablesIndex"

, "fnServerParams": function( aoData )
{
aoData.push( { name: "ntype", value: 7 } );
}

, "aoColumns": columns
, "aaSorting": [ [ 0, "asc" ] ]
, "sPaginationType": "full_numbers"
, "sDom": '<"top"ip<"clear">>rt'
}
).fnSetFilteringDelay( 300 );

TableReport = $('#tableReport').dataTable();

}
[/code]

In the DataTableParams
i have added ntype.
But when i run , i could not get the ntype value at server.
ntype is 0 when i debug,

Can anyone help ?

Thanks.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Are you using DataTables 1.8.2? fnServerParams was added in 1.8.2.

    Allan
  • genialgenial Posts: 9Questions: 0Answers: 0
    yes,im using 1.8.2 only, but i could not get the ntype.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you give us a link to your example then please? If you look at the XHR in Firebug, I'm presuming it doesn't send the parameter out?

    Allan
This discussion has been closed.