Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81916

ServerSide ignores paging

$
0
0

I have this on the server

include( "DataTables.php" );


// Alias Editor classes so they are easy to use
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate;

// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'customers' , 'custID')
    ->field(
        Field::inst( 'customers.custID' )->set(false),
        Field::inst( 'companyName' ),
        Field::inst( 'companyType' )
            ->options( Options::inst()
                ->table( 'companyTypes' )
                ->value( 'value' )
                ->label( 'label')
            ),
        Field::inst( 'address1' ),
        Field::inst( 'address2' ),
        Field::inst( 'address3' ),
        Field::inst( 'Town' ),
        Field::inst( 'Post_Code' ),
        Field::inst( 'Mobile' ),
        Field::inst( 'Telephone' ),
        Field::inst( 'Email' ),
        Field::inst( 'Notes' ),
        Field::inst( 'Member' )
        )
        ->join(
        Mjoin::inst( 'contacts' )
            ->link( 'customers.custID', 'contacts.custID' )
        ->fields(
        Field::inst( 'custID' )->set(false),
        Field::inst( 'FirstName' ),
        Field::inst( 'Surname' ),
        Field::inst( 'Mobile' ),
        Field::inst( 'Email' )
            )

            )


    ->process( $_POST )
    ->json();


on the client I have

  $("#dtCustomers").dataTable().fnDestroy();
        $('#dtCustomers').empty();
        tableCustomers = $('#dtCustomers').DataTable( {

        ajax: "http://www.xxx.com/xxxx.php",
        serverSide : true,
        customerData : data,
        scrollY: "300px",
        scrollCollapse: true,
        paging: true,
        info: false,
        select: true,
        ordering: true,
        order: [[0, 'desc']],
        dom: "Bfrtip",
        autoWidth : true,
        responsive: true,
        select: true,

I'm testing to see if I get any quicker results.

If I set serverSide:false the paging works as expected but if I set to false the paging is ignored.

What am i missing here ?

Cheers

Steve Warby


Viewing all articles
Browse latest Browse all 81916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>