extjs - Modern Toolkit- Grid with Multiselection:如何在网格行选择上勾选多个复选框。?
问题描述
在现代多选网格中,只有当我单击复选框时才会选中多个复选框。但我希望在网格行选择上勾选多个复选框。任何人都可以请建议。
解决方案
在以下示例中,选择是通过点击行产生的:
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,
}
});
推荐阅读
- python - 如何使用 CatBoostClassifier 为不同的输入定义不同的文本处理逻辑
- python - 跨平台 Python 以识别应用程序/进程为重点
- javascript - RxJS Observable - 在使用下一个发射值之前等待异步方法完成
- javascript - Flatpickr range插件问题
- mapstruct - MapStruct 发出映射对象到列表
- keras - 如何计算作为神经网络输入的图像序列的 MSE?
- java - PropertyPlaceHolderConfigurer 替代方案
- quarkus - Quarkus - 如何在客户端使用密钥库与 TLS 建立 GRPC 会话?
- mysql - 更改正在运行的应用程序的 MySQL 字符编码
- mongodb - 如何配置 Debezium 的 MongoDB 源连接器以按照 Postgres JDBC 接收器连接器的预期发送 record_value 中的 pk 字段