Get JSON value in createdRow event handler?
Get JSON value in createdRow event handler?
a_perez
Posts: 2Questions: 1Answers: 0
If the JSON object returned from the server looks like this:
{ data: (8) […], custom_param: "custom_value" }
Is it possible to get 'custom_param' value in createdRow event handler?
Normally, I could get it by doing this:
var value = table.ajax.json().custom_param;
But in createdRow event handler there is no API instance yet so I can't use this method.
Any ideas?
This discussion has been closed.
Answers
I answer myself :
createdRow: function(row, data, dataIndex) {
var value = this.api().ajax.json().custom_param;
...
}
Hope it helps. Thanks!