Is it valid to assign an object or function to columns.data when using serverside processing?

Is it valid to assign an object or function to columns.data when using serverside processing?

evereusevereus Posts: 1Questions: 1Answers: 0

The columns.data documentation states that an object or function can be assigned to the data field. However, when I assign an object, I receive the following warning:

DataTables warning: table id=player-table - Requested unknown parameter '[object Object]' for row 0, column 1. For more information about this error, please see http://datatables.net/tn/4

My column definition is:

"data": {
      "_": "days_total",
  },
  "title": "Num days",
  "searchable": false,
  "type": "num"
},

Defining a function does not work, because it sends data=function which crashes the serverside script.

Is defining an object or function for columns.data when using serverside processing supported?

thanks

Answers

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    "data": {
    "_": "days_total",
    },

    This doesn't seem like it would work. Are you trying to work with nested objects? If yes see this example.

    Please post an example of your JSON data structure so we can help.

    Kevin

This discussion has been closed.