Update a specific cell in a table.
Update a specific cell in a table.
classic12
Posts: 228Questions: 60Answers: 4
in DataTables
Can't find an example anywhere.
I have the row index of tableInvoices
$('#dtInvoices').on( 'select.dt', function ( e, dt, type, indexes ) {
selectedInvoiceID = tableInvoices.cell('.selected', 0).data();
if (currentInvoiceID !== selectedInvoiceID )
{
selectedInvoiceIndex = table.row( this ).index() ;
}
} );
Elsewhere I calculate some totals and need to post these into dtInvoices
I see
editorInvoices.set( 'invoice.totalNett', (total));
What is the syntax to update ( column 'invoice.totalNett' row selectedInvoiceIndex )
Cheers
Steve Warby
This discussion has been closed.
Replies
You need to trigger editing on that row first. You can do inline editing with
inline()
or you can trigger editing on the whole row withedit()
and pass in the row index.Allan
Hi Allan,
I need to trigger this on another table on a dependent action.
I select the index here
When editing the dtInvoiceDetails table I am using
So I need to update dtInvoices selectedInvoiceIndex with invNett - invTotal & invTax
I see in the docs
But how do I specify the row to update ?
Cheers
Steve Warby
Sorry,
brain freeze and late nights