POST - Column Data - Not mapping correctly

POST - Column Data - Not mapping correctly

creatorDotJScreatorDotJS Posts: 20Questions: 6Answers: 0

Debugger when serverSide set to false:
http://debug.datatables.net/ekaqad
Unsure why my column data is not displaying. There is also this message in the debugger: "aoColumns": "-- Previously seen object. Not included due to circular reference possibility --"

Debugger when serverSide set to true:
http://debug.datatables.net/uxorik
"Showing 0 to 0 of 0 entries (filtered from NaN total entries)"

This question has an accepted answers - jump to answer

Answers

  • creatorDotJScreatorDotJS Posts: 20Questions: 6Answers: 0

    Code snippet - if that is helpful...

    var test2 = '{"userName":"' + sessionName + '", "token":"' + sessionToken1 + '", "userID":"' + userIDGrab + '", "propID":"' + propIDGrab + '", "invoiceType":"GetHistory"}';
        
        $('#history').dataTable ({
            "processing": true,
            "serverSide": true,
            "ajax": {
                "url": "BackEnd/WebService.php",
                "type": "POST",
                "data": {
                        newInvoice: test2   
                        },
                "dataSrc": ' '
            },
            "columns": [
                { "data": "newInvoiceNum" },
                { "data": "qfInvoiceNum" },
                { "data": "qfLineStr" }
            ]
        });
    
  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Just to clarify, it does display data when client-side processing? It looks like it is from the debugger.

    When server-side processing however, it isn't working as the Ajax response doesn't contain the data required by server-side processing.

    Allan

  • creatorDotJScreatorDotJS Posts: 20Questions: 6Answers: 0

    Allan -

    I figured it out. It does display with client-side processing. HTML error. That's always fun. Thank you for your speedy response. In the debugger it looked as though there was a problem with the data - but it works great! Thank you.

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    In the debugger it looked as though there was a problem with the data

    Yes, the debugger can be a little tricky to use first time out. I need to do something about that!

    Allan

This discussion has been closed.