Next page not selecting

Next page not selecting

xeroo125xeroo125 Posts: 1Questions: 0Answers: 0

Hey,

Great plugin, thanks!

DataTables 1.10.7 (Using datatables bootstrap for Bootstrap 3)

I am using server side pagination but it is not working. The correct number of pages are created, but when I click on "2" for example, it fires the ajax request, but the "start" paramater is 0. Once the request has ended, the table is still on page 1.

Here is my table:

$(element).dataTable({
                    serverSide: true,
                ajax: '/AccountDetails',
                columns: [
                    {
                        name: 'StockLevelCreateDate',
                        data: 'stockLevelCreatedDate',
                        title: "Transaction Date",
                        sortable: false,
                        searchable: false
                    },
                    {
                        name: 'AccountCode',
                        data: 'accountCode',
                        title: "Account Code",
                        sortable: false,
                        searchable: false
                    },
                    {
                        name: 'ProductName',
                        data: 'productName',
                        title: "Product Name",
                        sortable: false,
                        searchable: false
                    },
                    {
                        name: 'ProductCode',
                        data: 'productCode',
                        title: "Product Code",
                        sortable: false,
                        searchable: false
                    },
                    {
                        name: 'Description',
                        data: 'description',
                        title: "Description",
                        sortable: false,
                        searchable: false
                    },
                    {
                        name: 'credit',
                        data: 'adjustment',
                        title: "Credit",
                        sortable: false,
                        searchable: false,
                        render: function(a, b, data) {
                            return data.adjustment < 0 ? "-" : data.adjustment;
                        }
                    },
                    {
                        name: 'debit',
                        data: 'adjustment',
                        title: "Debit",
                        sortable: false,
                        searchable: false,
                        render: function(a, b, data) {
                            return data.adjustment < 0 ? data.adjustment * -1 : "-";
                        }
                    }
                ]
                })

Any ideas?

Replies

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Can you link to a test case showing the issue please (per the forum rules, so it can be debugged and we can offer help). I'm afraid I'm not sure why this would be happening as you describe unless the server isn't fully implementing the server-side processing protocol.

    Allan

This discussion has been closed.