How to add new in top of the position - using row.add() api method
How to add new in top of the position - using row.add() api method
sivaramakannan
Posts: 1Questions: 1Answers: 0
table.row.add( {
"col1": "Tiger Nixon",
"col2": "$3,120",
"col3": "2011/04/25",
"col4": "Edinburgh",
"col5": "5421"
} ).draw();
I have used above code. But It appers in bottom of the table. How to solve that ???
This discussion has been closed.
Answers
The position of the newly added row in the table is entirely defined by the ordering criteria applied to the table. If you want a row to appear at the top, you need to use ordering (sorting) to put it at the top.
Allan