adding extra column in beginning.

adding extra column in beginning.

upendra1024upendra1024 Posts: 2Questions: 1Answers: 1

Hi,
I'm using 'Javascript sourced data' with 4 columns. I have to add 5th column in beginning with check box with value of next 2 columns(comma separated strings). and I don't want to change 'Javascript source data'.

Is it possible by just changing client side configuration like columnDef...
Please let me know.
Thank you all for giving such a great tool that helping me lot whenever i need to show/filter/search... data in table.

This question has an accepted answers - jump to answer

Answers

  • upendra1024upendra1024 Posts: 2Questions: 1Answers: 1
    Answer ✓

    I have done this...
    In last i had to change 'Javascript sourced data' with first column with json array(containing next 2 column value, comma separed string).

    and on client side
    {className:"checkBoxColumn", "targets":0,
    "orderable": false,
    "searchable": false,
    "render": function(data,type,row,meta) {
    var chkBox = '<input type="checkbox" name="plotRowCheckBox" value="'+data+'"/>';
    return chkBox;
    }
    }

This discussion has been closed.