Column control Values are not updating

Column control Values are not updating

HamzaAhmad0305HamzaAhmad0305 Posts: 3Questions: 1Answers: 0
edited February 2022 in TableTools

Hello,

I have a dynamic datatable in which input controls are creating from ajax call. And this table have more than 10 rows. All the input controls are editable. The data load from ajax call and user can further modify this data. But the problem is i want to send this data to server in json form and when i use
table.rows().data().toArray()
it returns me ajax data that i have load earlier but i want modified data.

i'm using below code to update td,tr but this seem's not to be working condition.

$('#tblCommissionDetails').on('change', 'input', function () {     
        var tdCell = $(this).closest('td');     
        //update the value
        $(this).attr('value', this.value);       
        /*$('#tblCommissionDetails').DataTable().draw();
        var idx = $('#tblCommissionDetails').DataTable().cell(tdCell).index().row;
        var data = $('#tblCommissionDetails').DataTable().cells(idx).invalidate().draw(false);*/
    }); 

Any suggestions will be appreciated.

Regards

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.