Update for a hidden column

Update for a hidden column

hawkmasterhawkmaster Posts: 56Questions: 20Answers: 0
edited April 2014 in General
Hello
I am new with DataTables. I have now a datatabel with data from a mysql db and with Ajax request
Now I try to edit table data and want then to update also in a mysql db
The inline edit and save works fine. I did is like in this example
http://datatables.net/blog/Inline_editing

My problem is now;
To make an easy update later in the MySQl db I would like to do this with thew unique ID from the row.
In the moment I load the ID in the first column of my table. But this is not so nice because the user do not want to see the internal ID. It is not helpful for him.
But when I try to disable the first column like;
[
{ "mData": "timeid",
"bVisible": false,
"sWidth": 1

},
{ "mData": "projectday",
"sWidth": 80
},

I cannot do the Edit later because there is an mismatch of the columns.

Can somebody give me an hint ?

best regards
Hans

Replies

  • hawkmasterhawkmaster Posts: 56Questions: 20Answers: 0
    Nobody has an idea?
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    You'll need to modify the code a little to take account of the hidden column - i.e. the array using for fnAddData needs to have an entry for every row.

    Editor has full support for hidden columns: http://editor.datatables.net .

    Allan
  • hawkmasterhawkmaster Posts: 56Questions: 20Answers: 0
    Hello Allan
    thanks a lot for help.
    Can you please give me a little bit more details about "modifiy columns"? Hoe can I hide the column with the ID that it not visible for the user but can be used internally for an update?
    best regards
    hawk
This discussion has been closed.