Updating hidden fields

Updating hidden fields

willemwe0willemwe0 Posts: 2Questions: 0Answers: 0
edited February 2013 in General
Hey guys, firstly big up for the awesome plugin!

I have been searching the forums a bit, but can't find anything quite like this:

I have 2 hidden fields to use for filtering and it works great, the only problem is I need top update the data in them after a action. So in one of my fields I have a AJAX call to update data, but I do not reload the datatable. After the update takes place I need to update my hidden field with the updated information so when I filter again it filters on the updated field.

Tell me if you need some code, I would post it now, but there is a lot of code.

Thanks

Replies

  • wblakencwblakenc Posts: 78Questions: 17Answers: 1
    I think you have to make sure that datatables updates what it knows about that field after it was updated, otherwise the sort will not work correctly (someone correct me if I am wrong). The best way I know how to update what dt knows about the info in the cell is to update it using fnUpdate.
  • willemwe0willemwe0 Posts: 2Questions: 0Answers: 0
    Thanks a lot, I run the following, oTable.fnUpdate( '0', index, field); and it works for all other fields except for the hidden ones. Index is the row and field is the TD for my fields from 0 - 6 it updates perfectly, but from 7 - 8 it doesn't appear to. I cannot be sure as I can't actually see there values, but when I sort again it doesn't sort with there new value.

    Thanks
This discussion has been closed.