Issue Update Datatables

Issue Update Datatables

AewilAewil Posts: 9Questions: 2Answers: 0

Hello Everyone !

I have a little problem when i'm trying to update Datatables (1.9.4 > 1.10.7)...
When i load the new version, my table shows all the rows in one page. The pagination is completely down :/

Can you help me please ?

Best Regards,

Aewil

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    What does your DataTables initialization script look like?

  • AewilAewil Posts: 9Questions: 2Answers: 0
    var oTable = $('#table_id').dataTable({
            "oLanguage": {
                "sSearch": "SEARCH ",
                "sZeroRecords": "Nothing found - sorry",
                "sInfo": "Showing _START_ to _END_ of _TOTAL_ records",
                "sInfoEmpty": "Showing 0 to 0 of 0 records",
                "sInfoFiltered": ""
            },
            "oTableTools": {
                "aButtons": [
                    {
                    "sExtends":    "text",
                    "sButtonText":"Refresh",
                    "fnClick": function ( nButton, oConfig, oFlash ) {
                        oTable.fnClearTable();
                    }
                    }
                ]
            },
        "dom": 'RCT<"clear">lfrtip',
        "pagingType": "full_numbers",
        "order": [[15, 'desc']],
            "serverSide": true,
        "stateSave": true,
            "processing": true,
            "aoColumns": [
                { "sClass": "center" },
                { "sClass": "left" },
                { "sClass": "center" },
                { "sClass": "center" },
                null,
                null,
                { "sClass": "center" },
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "fnServerData": function ( sSource, aoData, fnback ) {
            /* Add some data to send to the source, and send as 'POST' */
                aoData.push( { "name": "ranumin", "value": $('#ranumin').val() } );
                aoData.push( { "name": "ranumax", "value": $('#ranumax').val() } );
                aoData.push( { "name": "code", "value": $('#code').val() } );
                aoData.push( { "name": "ranuprmoymin", "value": $('#ranuprmoymin').val() } );
                aoData.push( { "name": "ranuprmoymax", "value": $('#ranuprmoymax').val() } );
                aoData.push( { "name": "strikemin", "value": $('#strikemin').val() } );
                aoData.push( { "name": "strikemax", "value": $('#strikemax').val() } );
                aoData.push( { "name": "min", "value": $('#min').val() } );
                aoData.push( { "name": "max", "value": $('#max').val() } );
                aoData.push( { "name": "expimin", "value": $('#expimin').val() } );
                aoData.push( { "name": "expimax", "value": $('#expimax').val() } );
                aoData.push( { "name": "pmin", "value": $('#pmin').val() } );
                aoData.push( { "name": "pmax", "value": $('#pmax').val() } );
                aoData.push( { "name": "hmmin", "value": $('#hmmin').val() } );
                aoData.push( { "name": "hmmax", "value": $('#hmmax').val() } );
                aoData.push( { "name": "actionmin", "value": $('#actionmin').val() } );
                aoData.push( { "name": "actionmax", "value": $('#actionmax').val() } );
                aoData.push( { "name": "obpmin", "value": $('#obpmin').val() } );
                aoData.push( { "name": "obpmax", "value": $('#obpmax').val() } );
                aoData.push( { "name": "volmin", "value": $('#volmin').val() } );
                aoData.push( { "name": "volmax", "value": $('#volmax').val() } );
                aoData.push( { "name": "contrmin", "value": $('#contrmin').val() } );
                aoData.push( { "name": "contrmax", "value": $('#contrmax').val() } );
                $.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": "php/serveurdbnakedput.php",
                    "data": aoData,
                    "success": fnback
                });
            }
        });
    

    Something like that...

  • AewilAewil Posts: 9Questions: 2Answers: 0
    edited July 2015

    The aoColumnDefs doesn't work too. :/

  • AewilAewil Posts: 9Questions: 2Answers: 0

    I can maybe explain a little bit what i want to help you !

    In reality, this version works very well but the StateSaving doesn't work with ColVis. This is just why i want to upgrade the version.

This discussion has been closed.