Sorting DataTable after Values have changed on the Client side - Not working

Sorting DataTable after Values have changed on the Client side - Not working

mitcivmitciv Posts: 2Questions: 0Answers: 0
edited July 2011 in General
Hey Guys,

So, I've got a data table that has its values changing on a button click, the values are all changing on the client side, and all I want to do is be able to sort the table.

What I've tried:

Create the datatable, and do nothing else -- Didn't work, after a button click and the values changed if I hit a table header to sort it the values all went back to the original values.

After button click to change the values call fnDraw() on the data table -- Didn't work, on the button click it reset the values back to what they were originally set to.

After the button click to change the values, destroy the datatable (fnDestroy) then recreate it -- Didn't work, on the button click it added the new values but also kept the old values, resulting in twice as many rows.

Any help would be greatly appreciated.

Cheers!

Replies

  • tedkalawtedkalaw Posts: 12Questions: 0Answers: 0
    Did you use fnUpdate()?
  • mitcivmitciv Posts: 2Questions: 0Answers: 0
    I was trying to avoid using it, as not every row gets updated and there is quite a bit of code involved to loop through and grab every table cell value and store it in an array, and then find the TR thats associated with the row I wanted to update.

    I mean I can do that, I just figured there was a much more elegant way to update the table with its new values.
This discussion has been closed.