Disconnecting a DataTable column from Server-side updates

Disconnecting a DataTable column from Server-side updates

ruggggerrugggger Posts: 23Questions: 6Answers: 1

I have a DataTable which is connected to an Editor instance and so is updated from the Server-Side.
To my columns I added an extra collumn - '#' - which is not a DB field but is calculated according to the row number.

 columns: [
           { title: "#"},
              { title: "field1",data: "mea_report.remark" },
             { title: "field2",data: "mea_report.id },
   
     

How do I make sure that this column is disconnected from the DB and does not try to update or be updated by it ?

Cause right now I get a DataTables warning when the table loads - www.datatables.net/tn/4

Thanks

Yaron

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,822Questions: 1Answers: 10,517 Site admin
    Answer ✓

    Hi Yaron,

    Set the columns.data property to be null if the data for the column isn't in the JSON data source. You'll probably need to use columns.render to populate the column's cells with data.

    Allan

This discussion has been closed.