Editor - inline submit option

Editor - inline submit option

ATIMICATIMIC Posts: 4Questions: 1Answers: 0
edited June 2016 in Free community support

Hello,
I've noticed something when i edit some values in my datatable. I'am using this example :
https://editor.datatables.net/examples/inline-editing/editIcon.html
Server side, when i post the new val, i only get the datas as they are displayed, but not the id value (which is not displayed in my table).
Is there a way to get this data (the row id)?
I've tried with submit : all and submit : allIfChanged, but impossible to get the row id.
Thank you

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,301Questions: 1Answers: 10,216 Site admin
    Answer ✓

    The submit option of form-options set to allIfChanged is the correct way to do this. The row id is part of the data key submitted.

    For example, consider:

    action                   = edit
    data[row_29][extn]       = 2947
    data[row_29][first_name] = Fiona
    data[row_29][last_name]  = Green
    data[row_29][office]     = San Francisco
    data[row_29][position]   = Chief Operating Officer (COO)
    data[row_29][salary]     = 850000
    data[row_29][start_date] = 2010-03-11
    

    In the above the row_29 is the primary key (id).

    Allan

  • ATIMICATIMIC Posts: 4Questions: 1Answers: 0

    thank you !

This discussion has been closed.