在现代的多选网格中,只有当我点击复选框时,多个复选框才会被选中。但我希望多个复选框在网格行选择时被选中。有人能建议吗?
raogr8fs1#
在以下示例中,通过点击行来生成选择:
var grid = Ext.create('Ext.grid.Grid', { title: 'Streaming Service Providers', columns: [{ text: "Brand", dataIndex: "brand", flex: 1 }, { text: "Headquarters", dataIndex: "headquarters", flex: 1 }, { text: "Trial", dataIndex: "trial", flex: 1 }, { text: "Price", flex: 1, dataIndex: 'price' }], store: { fields: ['brand', 'headquarters', 'trial', 'price'], data: [{ brand: 'Netflix', headquarters: 'California', trial: '1 Month', price: '$7.99' }, { brand: 'YouTube', headquarters: 'California', trial: '1 Month', price: '$9.99' }, { brand: 'Amazon Prime', headquarters: 'Seattle, Washington', trial: '1 Month', price: '$8.25' }], storeId: 'serviceStore' }, height: 400, renderTo: Ext.getBody(), // Row checkbox selection model config selectable: { columns: false, mode: 'multi', checkbox: true, cells: false, rows: true, } });
1条答案
按热度按时间raogr8fs1#
在以下示例中,通过点击行来生成选择: