Debugging

Debugging

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited October 2012 in General
Hi,
What is the best way for me to see the JSON data that is loaded by data tables (to debug server side code)?
Is there a function which I can use to output the data to the dom?
If I go straight to the server side URL, I don't see any data, but only a JSON string like:

{"id":-1,"error":"","fieldErrors":[],"data":[],"aaData":[{"DT_RowId":"row_0","LName":"English"},{"DT_RowId":"row_1","LName":"Dutch"}]}

###

Moreover, in the above example I assume that DT_RowId is used internally by DT. I don't see any of my primary key names here.

Replies

  • nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
    I figured this out: Firebug and XHR data viewer
  • allanallan Posts: 63,531Questions: 1Answers: 10,474 Site admin
    > I assume that DT_RowId is used internally by DT. I don't see any of my primary key names here.

    DataTables uses DT_RowId to assign an ID to the TR elements it creates. This allows Editor to uniquely identify each row - needed for submission to the server.

    Allan
This discussion has been closed.