Node order after drop
Node order after drop
I realized that my drag and drop script for row reordering was only working on the current page of rows, which is not a good thing. I was iterating through the rows using $(this).parents('table').find('tr').each(function() {...} I'm trying to alter the script and I found that I can iterate through all the nodes using $(oTable.fnGetNodes()).each(function () {...})
Here's what I can't figure out though...the above code iterates through the nodes in the original order they were displayed in the table, not the order after dropping a row. Is there a way to get the nodes in the order they are currently in instead of when the table loaded?
Thanks for the help!
Here's what I can't figure out though...the above code iterates through the nodes in the original order they were displayed in the table, not the order after dropping a row. Is there a way to get the nodes in the order they are currently in instead of when the table loaded?
Thanks for the help!
This discussion has been closed.
Replies
Allan
oTable.$('tr').each(function() { ... }
it's still not picking up the new order. Tried forcing the current order with this:
oTable.$('tr', { 'order': 'current' }).each(function() { ... }
but it still used the original order. Am I using the $ API method correctly?
The good news is that it's iterating through all the pages now...
I think what I need to do is update the row that I'm moving first, then go through my loop.
Now I just need to figure out how to get back to the page I was on when doing fnDraw(): DONE