How to add dynamically added row at the top of the table?

How to add dynamically added row at the top of the table?

montymonty Posts: 2Questions: 0Answers: 0
edited August 2011 in DataTables 1.8
Hi,

Thanks for taking out time for this.

I am using oTable.fnAddTr to dynamically add a html row (tr) to the table using ajax. When I am adding the first row it adds to the top of the existing rows, but the subsequent entries adds below the newly added rows, for example if we have following rows.
row1
row2
row3

i add a new row "row4" then it becomes

row4
row1
row2
row3

next if i add "row5" then it becomes
row4
row5
row1
row2
row3

What i want is when i add a new item it should always add as the first item in the table. Any help on this will be greatly appreciated.

Thanks,
Monty.

Replies

This discussion has been closed.