I am trying to figure out how to set a column to a specific width. When I use, width: 10, inside the colModel definition, it does not appear to have an effect. Below is what I have in my javascript:
var colModel = [
{
title: "Actions", dataType: "string", dataIndx: "ID", editable: false, align: "left", width: 10, wrap: false
, render: function (ui) {
var DocId = ui.cellData;
return "<button type='button' onClick=javascript:getDocuments(" + DocId + ") class='btn btn-primary'><i class='bi bi-file-earmark-pdf' data-bs-toggle='tooltip' data-bs-placement='bottom' title='Click here to download this document.'></i></button>"
+ "";
}
},
{ title: "Document Name", dataType: "String", width: 500, wrap: true, dataIndx: "DocName", editable: false },
{ title: "Resource Category", dataType: "string", dataIndx: "categoryDesc", editable: false },
{ title: "Document Date", dataType: "string", dataIndx: "DocDateTime", editable: false },
{ title: "Document Desc", dataType: "string", dataIndx: "DocDesc", width: 200, editable: false }
];
What can I do to always make the first column 10px long?