I am creating a table through jQuery and in this table I concatenate 3 columns in 1 column:
Before concatenate:
if (re.length > 0) { $("#services_schdulue").append $('#services_schdulue thead').append("<tr><th>Service ID</th><th>Service Type</th><th>frequency</th><th>Freq_Duration</th><th>Freq_Mileage</th></tr>"); for (var i = 0; i < re.length; i++) { if (re[i] !== null) { $('#services_schdulue tbody').append('<tr><td>' + re[i][0] + '</td><td>' + re[i][1] + '</td><td>' + re[i][2] + '</td><td>' + re[i][3] '</td><td>' + re[i][4] + '</td></tr>'); } } }
After concatenate:
if (re.length > 0) { $("#services_schdulue").append $('#services_schdulue thead').append("<tr><th>Service ID</th><th>Service Type</th><th>S freq</th></tr>"); for (var i = 0; i < re.length; i++) { if (re[i] !== null) { $('#services_schdulue tbody').append('<tr><td>' + re[i][0] + '</td><td>' + re[i][1] + '</td><td>' + re[i][2] + '' + re[i][3] + '' + re[i][4] + '</td></tr>'); } } } var myTable = $('#services_schdulue').DataTable({ "columnDefs": [{ "visible": false, "targets": [3,4,5] }] });
Now I try to display this columns value in text box
Service Type, frequency,Freq_Duration,Freq_Mileage