Change the data while changing table
Change the data while changing table
Hi in my current projet i have a feature that allow the user to switch rows from one tab to another, so far it's working as intended.
What i want to do now is to check the .data() and do something depending on what's in the first column, but so far when i use.data, i get a long string of the whole TH row and i can't see to be able to split it to get the first value.
I use this piece of code to swap lines from one tab to the next :
var addRow = rulesTable.row($row);
caractTable.row.add(addRow.data()).draw();
addRow.remove().draw();
value = addRow.data();
Anyone who could help me achieve this ?
This question has an accepted answers - jump to answer
Answers
addRow.data()
will give you the data object for the row. So if you are using arrays, you could access the first property using[0]
. If you are using objects, you could use.myPropertyName
.Allan