How to update cells belonging to fixed columns dynamically?
How to update cells belonging to fixed columns dynamically?
Hi,
usually, I call the dataTables method fnUpdate() to update cell content in the visible table.
Unfortunately, this does not work for the cells of the fixed columns. Therefore my question: How to change the cell content of the fixed columns?
Here is a jsfiddle to show the problem: you can call fnUpdate with the "Update" button (I switched off the predraw and redraw flags, since otherwise the server side table would overwrite the change immediately).
http://jsfiddle.net/rplantiko/8vXg5/
When specifying a cell in column 2 (which is non-fixed), the update works. In the fixed columns 0 and 1, it does not work.
usually, I call the dataTables method fnUpdate() to update cell content in the visible table.
Unfortunately, this does not work for the cells of the fixed columns. Therefore my question: How to change the cell content of the fixed columns?
Here is a jsfiddle to show the problem: you can call fnUpdate with the "Update" button (I switched off the predraw and redraw flags, since otherwise the server side table would overwrite the change immediately).
http://jsfiddle.net/rplantiko/8vXg5/
When specifying a cell in column 2 (which is non-fixed), the update works. In the fixed columns 0 and 1, it does not work.
This discussion has been closed.
Replies
So I had to rewrite the rowUpdate which didn't work for fixed columns myself.
Here is the solution (in the closure variable params of the enclosing function, I have kept some of the datatable's settings, for example iLeftColumns).
[code]
// Optimierung: Einzelne Zeilen aktualisieren
function updateRow( oSettings, row, iRow ) {
var i,display;
if (params.fixedColumns) {
oTable.fnUpdate( row, iRow, undefined, false);
for (iCol=0;iCol