i have set my th with style="width:240px !important;".
but when the table get render, the actual width of the cell get shrink to 180px.
kendo grid seems to be trying to shrink the table to fit into the container.
my js to render kendo grid is
$(document).ready(function() {
$("#kendo-table").kendoGrid({
sortable: true,
scrollable: false,
sort: function(e) {
// Prevent the default behavior.
e.preventDefault();
// Check which column is being sorted. We only need to change the sorting behavior for the first column(the one with the link).
let field = e.sort.field;
if (field == "link") {
// Specify a custom compare function
e.sort.compare = function(a, b, desc) {
// Extract only the part between <a></a>.
let aNoHref = a.link.trim().match(/<a [^>]+>([^<]+)<\/a>/)[1];
let bNoHref = b.link.trim().match(/<a [^>]+>([^<]+)<\/a>/)[1]
// Compare the two values.
return aNoHref.localeCompare(bNoHref);
}
}
// Sort the dataSource manually.
this.dataSource.sort(e.sort);
},
pageable: {
pageSizes: false,
messages: {
display: "" // set it to an empty string
}
}
});
$("#kendo-table").data("kendoGrid").dataSource.pageSize(10);
});