Updating Javascript sourced data

Updating Javascript sourced data

sjw01sjw01 Posts: 67Questions: 36Answers: 1

Example: http://live.datatables.net/lidequra/21/edit

Each row allows the updating Expected Close Data and Advisor Notes
Notes are saved to db and loaded if exists when the row is opened

What I want to do is save to db AND copy date from "Expected Close Date" into Last C/O Date

Can I insert into the Javascript sourced data table "DataSet" or just write straight to the table cell?
When expanding the child table, it passes row.data() into the function which uses data from the row.
Is this data extracted from the row itself or the DataSet?
If I updated the table cell, will it read back into row.data()?

Answers

  • sjw01sjw01 Posts: 67Questions: 36Answers: 1
    edited July 2018
                var tr = $(ro_form).closest('tr').prev();
                var row = table.row( tr ).data();
    
                // Update column in array with Yes and redraw row
                row[17] = expected_close_date;
                table
                    .row( tr )
                    .data( row )
                    .draw();
    
This discussion has been closed.