Ajax Callback

Ajax Callback

shannonwregeshannonwrege Posts: 22Questions: 9Answers: 0

I have some data in the json packet that is universal to the dataset. For example:

{
classof: 2017,
gender: "F",
data: [
...
]
}

The table is loaded from what is contained in the data array, but I'd like access to the classof and gender variables BEFORE the table rows are rendered. I could put these fields in every row of the dataset in the data variable, but this seems like overkill especially if I have thousands of rows and since they will all contain the same information. From my own experimentation, the initComplete function is called after the rows are rendered. Likewise when changing the ajax url (e.g. table.ajax.url(desired_url).load(function() {...}), the load function is executed after the rows have already been rendered.

Is there a way I can access the classof and gender variables before the rows are rendered?

Answers

This discussion has been closed.