I am controlling the column width by modifying the contents if too long and displaying the full text in a tooltip.
{
targets: [3],
"render": function (data, type, row, meta) {
return type === 'display' && data.length > 20 ?
'<span title="' + data + '">' + data.substr(0, 18) + '...</span>' : data;
}
},
{
targets: [3],
"render": function (data, type, full, meta) {
return '<span data-toggle="tooltip" title="' + data + '">' + data + '</span>';
}
}
Using the span element, you could control length directly as well.
{
targets: [3],
"render": function (data, type, full, meta) {
return '<span style="display: inline-block; width:200px;">' + data + '</span>';
}
}