Accessing row data from Nested DataTable
Accessing row data from Nested DataTable
When dealing with "regular" DataTable rows, I can access the underlying data by using the following:
pricesEditor.on('open', function(e, mode, action) {
...
priceData = pricesTable.row({
selected: true
}).data();
});
How can I access the data from a row in a Nested DataTable?
This discussion has been closed.
Answers
You will need to access the API of the nested table, ie replace
pricesTablewith the nested table API. The next question is how to access the nested Datatable API. That depends on how you are nesting the Datatables. Are these in Child Detail Rows or something else. Maybe you can post the relevant code showing your nested Datatable soluition.Kevin
If you are using a
datatablefield type, it has adt()method to get the DataTable API instance - e.g.:Allan
Hi Allan,
I thought that
editor.fieldtakes a field name?I have not been able to get it to work. I am using a
datatablefield type, but I am not sure what field name to use!It does. I just used
myTableas a placeholder. In this example it would be'users.site'.Perhaps you can show me your full code, or give me a link to a page showing the issue?
Allan