在使用gridx中的ColumnResizer模块时,可以通过设置列的resizeable属性来禁止某些列调整宽度,例如:

var grid = new Grid({
    ...
    structure: [
        { field: 'id', name: 'ID', width: '50px', resizable: false },
        { field: 'name', name: 'Name', width: '100px' },
        { field: 'age', name: 'Age', width: '50px' }
    ]
});

在上面的例子中,第一列的resizeable属性被设置为false,即不可调整宽度。其他列仍然可以调整宽度。

dojo gridxmodulesColumnResizer 手工设置列禁止调整宽度

原文地址: https://www.cveoy.top/t/topic/fsi1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录