Skip to content

resizeColumn

enables/disables horizontal resizing of columns

let resizeColumn: boolean|WebixResizeRowColConfig
webix.grid({
resizeColumn:true
});
// define the size of area where resizing can start
webix.grid({
resizeColumn:{size:6}
});
// allow resizing only in the header
webix.grid({
resizeColumn:{headerOnly:true}
});

By default, the parameter is disabled.

When enabled, the method doesn’t actually resize the datagrid. After a page is refreshed, the size returns to the initial one (provided that you haven’t saved the state of the grid).

To change a column size, the user must drag its right border. To spread the area, where the mouse pointer can grab and drag the border, define the size in pixels (the example above).

You can disable resizing of a particular column by setting its resize property to false:

webix.grid({
// enable columns resizing
resizeColumn: true,
columns:[
// disable resizing of the "rank" column
{ id:"rank", resize:false, header:"", css:"rank", width:50},
{ id:"title", header:"Film title", fillspace:true},
// ...
],
});

you can check the full snippet DataGrid: Deny Resizing for a Column

Articles

API