How to update cells belonging to fixed columns dynamically?

How to update cells belonging to fixed columns dynamically?

rplantikorplantiko Posts: 18Questions: 1Answers: 0
edited August 2013 in General
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.

Replies

  • rplantikorplantiko Posts: 18Questions: 1Answers: 0
    ... same problem with fnAddData .
  • rplantikorplantiko Posts: 18Questions: 1Answers: 0
    I didn't find a "real" solution for this. I now perform any update on server-side: the price being that the table's visible rows have to be re-rendered completely with each change. This works, but is far from elegant.
  • rplantikorplantiko Posts: 18Questions: 1Answers: 0
    My "solution" from 9/11, to re-render the complete section on each field update, didn't survive the integration tests. Users expanded to "Show 100 rows", and the costs fo re-rendering this section were so massive that they couldn't work fluently with the table.

    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
This discussion has been closed.