Hi Alberto
Thanks for your update,
Query #1: I haven't found how to change AutoFit behaviour, which can make grid wider than initial size (set to auto).
As per your query, we have defined the AutoFit property to whole Grid columns using dataBound event of Grid component. we have prepared sample in that we have used the autoFitColumns feature along with maxWidth. When you set maxWidth and use autoFitColumns feature the columns were autofitted up to the maxWidth and the if the column content width is greater than maxWidth. Please refer the below code example and sample for more information.
|
function onGridDataBound() {
const columns = this.columns
.filter(x => x.visible)
.map(c => c.field)
.slice(0, -1);
this.autoFitColumns(columns);
} |
Query #2: When resizing any column for the first time, a disabled vertical scrollbar is added to the grid changing grid width. I want to avoid this scroll to appear, since it's not needed, but haven't found any way to set it up to the grid.
We have validated your query with provided the information and we have hide that scroller appearing while Grid column resizing. In below code example, we have hide the scroller using hideScroll method in resizeStop event of the Grid. Please refer the below code example for more information.
|
this.resizeStop = function (args) {
. . . .
this.hideScroll(); // Disappear the scroller
};
|
Please get back to us, if you need further assistance.
Regards,
Balaji Sekar