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

How to make cell().data() persist to DB

$
0
0

Noob question here: once I've modified a cell's data with cell().data() how do I get it to 'post' that to the DB?

So... I've added a button (based on one of your examples) that re-populates my 'rowReorder' column with 1...n based on the current sort. This is so that I can initially sort my data maybe alphabetically by name, for example, then 'save' that sort in my rowReorder column, then start reordering again from there. (Order is relevant to a lot of our lists.)

The function is working great, but it's just not saving to the DB. Can anyone please help me add to below code so it saves?

buttons: [
    {
        text: 'Reorder',
        action: function (e, dt, node, config) {
            table.column(0, {search:'applied', order:'applied'}).nodes().each(function (cell, i) {
                table.cell(cell).data(i + 1).draw();
            });
        },
    },

Viewing all articles
Browse latest Browse all 81986

Trending Articles



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