DataTables/DataTables — pull request #36 by moshen (2011-11-02 21:35:42+00:00)
Title: When fnUpdate is called, fnReDraw fires before every columns fnRender

When updating an entire row with data based on a data structure with nested objects or arrays, `fnReDraw` will die with a `TypeError`, leaving the raw data in `aData` and causing further calls to `fnReDraw` to fail.

For example, in my case I am building a datatable from a JSON data structure from a service. My data looks like this:

[
{
"id": 000000,
"cars": [ "pontiac firebird", "toyota supra" ]
},
...
]

And lets say, I specify an `fnRender` function for the `cars` column:

"fnRender": function(oObj){
var ret = "

";
for( var i in oObj.aData.cars ){
ret += "
" + oObj.aData.cars[i] + "
";
}
return ret + "

";
}

Calling `fnUpdate` as it is now will die silently. Internally there will be a `TypeError` when a `.replace` is called on the `cars` element. See: https://github.com/DataTables/DataTables/blob/master/media/js/jquery.dataTables.js#L1977

My changes cause the entire row to be rendered ( if updating a whole row ) before the search string update and `fnReDraw` calls.