DT_RowData does not appear to be inserting data-* information using server-side processing
DT_RowData does not appear to be inserting data-* information using server-side processing
We currently use the DT_RowID to successfully insert the row ID on each data row (jSON based, server side ajax), so we're pretty sure our formatting and methods are okay.
We want to insert other attributes on the <TR> so we tried to use DT_RowData. we checked the demos, the documentation, etc., and created the jSON entry similar to "DT_RowData": {"mydata1":value1}, but the data-* attributes are not getting inserting in the <TR> element node.
We read back the attributes in other parts of our code. We were wondering if anyone might have gotten DT_RowData to work correctly and would you happen to have an example of the jSON data that you passed? We're not interested in using classes for this purpose so we're not considering that a viable alternative.
Answers
Decided to enhance datatables so it works correctly with <TR> row attributes.
Around line 1680 ish of 1.10.1 -
json format will be:
"DT_RowAttr": {key1:"value1", key2:"value2", key3: value3"}