Datatable insert several new columns and values

is it possible to insert several columns at the same time into an existing datable?
See here:

And is it possible to load into these new columns new data from another datasource? I need to compare values in that table and the new columns need to be editable (therefore no Pivot?)...



  • edited August 2018

    Hi Martin,

    There isn't any specific method for inserting multiple columns, but you can work with datatable.config.columns as with a standard JS array:

    columns.splice(2, 0, config1, config2, ..);

    To fill the new columns with data, you need to add the related fields into each data item using the loop:{
         obj[field] = value;

    Please, check the related snippet:

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion