Merge 2 Columns into one
Merge 2 Columns into one
Hello everyone. I have already read your discussions on this topic. But my problem is that I already use columnDefs to be able to search only on the first column. When I add this code, which I found in one of your discussions: "(columnDefs: [ { render: function (data, type, row) {return data + ' (' + row[3] + ')'; }, targets: 1}, { visible: false, targets: [3] }]" unfortunately it gives me an error. The two columns are merged into one column, but it no longer carries out the search only on the first column, because columnDefs is used twice for different reasons How can I solve the problem? The table is created by reading a csv file and the columns that form the table are directly the data that come from the csv file. I attach the script I use. Thanks
Answers
columnDefs
is an array of definitions. Combine them into onecolumnDefs
option. Something like this:Kevin
Ok thanks, your advice worked.