Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82718

How to refresh table #2 when table #1 has been edited?

$
0
0

I have a subtotals table and a details table. I need to force a redraw of the subtotals table after any cell in the details table has been edited. (The server updates the subtotals table by using post edit events to call an update function)

``` var subtotalsTable;
$(document).ready(function() {

        myEditor = new $.fn.dataTable.Editor( {....

           var detailTable = $("#detailTable").DataTable( {
        "drawCallback": function( settings ) {
            subtotalTable.draw();
        }, ........

            subtotalTable = $("#subtotalTable").DataTable( { .....

```

I have an apparent scope issue - subTotalTable is undefined (in javascript console)
I tried to declare my subtotalTable variable as a global, but this did not work.

Any help would be much appreciated!


Viewing all articles
Browse latest Browse all 82718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>