Callback when table data changes

Callback when table data changes

sbarnettsbarnett Posts: 23Questions: 5Answers: 0
edited September 2011 in General
Hi,

I am using AJAX processing which calls a REST server every 5 seconds (using fnReloadAjax) to reload the table data in case it's changed.

What I want to do is to use the jquery method effect() in order to highlight any particular row data has changed.

Is there any way that I can get DataTables to tell me when the data it has retrieved is different to what it was before for a particular row?

So that I can call something like:-

[code]
$("#table_display tbody tr").live("some_event", function(event) {
$(this).effect("highlight", {}, 3000);
});
[/code]

Thanks,
Simon

Replies

  • sbarnettsbarnett Posts: 23Questions: 5Answers: 0
    Anyone have any idea on this?
  • sbarnettsbarnett Posts: 23Questions: 5Answers: 0
    Bump.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited September 2011
    You'd have to write your own. DataTables is not data aware. It's just the display/pagination mechanism, with some sorting/filtering for client data.

    You might make a copy of the oTable.fnSettings().aoData array, then refresh the table, then compare with the new aoData.
This discussion has been closed.