Dojo Gridx: Disable Column Resizing with ColumnResizer Module
To disable dragging and expanding column widths in the ColumnResizer structure of Dojo Gridx, you can set the resizable property to false. Here's a code example demonstrating this:
var grid = new Grid({
id: 'grid',
store: store,
structure: [
{id: 'id', field: 'id', name: 'ID', width: '50px', resizable: false},
{id: 'name', field: 'name', name: 'Name', width: '100px', resizable: false},
{id: 'age', field: 'age', name: 'Age', width: '50px', resizable: false},
{id: 'gender', field: 'gender', name: 'Gender', width: '50px', resizable: false}
],
modules: [
ColumnResizer
]
}, 'gridContainer');
In the code above, each column's resizable property is set to false, effectively preventing users from resizing columns by dragging.
原文地址: https://www.cveoy.top/t/topic/ogOQ 著作权归作者所有。请勿转载和采集!