I’m building a grid dynamically with unknown width of columns and number of columns. Due to that, I am using the adjust: true configuration value. I have a check box column that allows selecting a row, as well as a select all check box. In order to accomplish this I have the following column configuration:
{
“maxWidth”: 60,
“id”: “isSelected”,
“type”: “boolean”,
“header”: [
{
“text”: “Select”,
“align”: “center”
},
{ “text”: “<label style=‘margin-left: 22px !important;’ class=‘dhx_checkbox dhx_cell-editor__checkbox’><input onclick=‘selectAll(checked)’ type=‘checkbox’ dhx_id=‘cell_editor’ class=‘dhx_checkbox__input’ style=‘user-select: none;’><span class=‘dhx_checkbox__visual-input’></span></label>” }
]
}
Table Configuration:
table = new dhx.Grid(“tableContainer”, {
columns: columns,
data: data,
editable: true,
autoHeight: true,
sortable: true,
adjust: true
});
Everything renders fine except the checkbox column width is massive. It appears the text property is what is used in auto adjust and it doesn’t take into account the usage of HTML. The maxWidth property also appears to be ignored as well when using adjust: true. Is there another way to accomplish what I’m trying to do? Thanks.