dojo gridxmodulesColumnResizer 统一设置列禁止调整宽度
要统一设置列禁止调整宽度,可以在创建GridX实例时在列定义对象中设置resizable: false。
例如:
var layout = [
{field: 'id', name: 'ID'},
{field: 'name', name: 'Name', resizable: false},
{field: 'age', name: 'Age', resizable: false}
];
var grid = new Grid({
id: 'grid',
store: myStore,
structure: layout,
modules: [
ColumnResizer
]
}, 'gridContainer');
在上面的代码中,我们在列定义对象中为“Name”和“Age”列设置了resizable: false,这将禁止用户调整这两列的宽度。注意,这将影响整个GridX实例,而不仅仅是ColumnResizer模块。
原文地址: https://www.cveoy.top/t/topic/fsiI 著作权归作者所有。请勿转载和采集!