Update row when hidden in pagination

Update row when hidden in pagination

daredevil82daredevil82 Posts: 1Questions: 0Answers: 0
edited July 2013 in General
How can I execute a fnUpdate operation on a row that is currently out of view due to pagination?

I'm developing a web app that uses two DataTable instances in different div containers. When one container is visible, the other is hidden via jQuery.fadeOut()/fadeIn()

In one div, I have a summary table that shows a selection of the data fields that are available in the other, hidden, container. The rows between these tables are mapped via a _id# suffix to the row ID, For example, row id "4_performance_3" in the summary table maps to row id "timeline_task_3" in the full detail table.

If row id "timeline_task_3" is not visible due to pagination and/or sorting, how can I update the row if I've applied changes to "4_performance_3"?

In the code snippet below, "element" is null when the row is out of view via pagination.

[code]
var tableArray = timelineTable.fnGetNodes();
var elemSplit;

for (var i = 0; i < tableArray.length; i++) {
elemSplit = tableArray[i].id.split("_");

if (elemSplit[2] == currentTask.id){
element = document.getElementById(tableArray[i].id);

timelineTable.fnUpdate(currentTask.internal, element, 0, false);
timelineTable.fnUpdate(currentTask.dueDate, element, 1, false);
timelineTable.fnUpdate(currentTask.label, element, 4, false);
timelineTable.fnUpdate(currentTask.complete, element, 6, false);
timelineTable.fnUpdate(currentTask.comments.length, element, 7, false);

timelineTable.fnSort([[1, "asc"]]);

console.log("updated timeline tasks");

}

}
[/code]
This discussion has been closed.