我想做一些类似的小提琴:https://fiddle.sencha.com/#view/editor&fiddle/20rt,但不同的是,他已经做了checkboxxtype,但我想它为checkcolumn。请让我知道,如果我们可以这样做?
piah890a1#
你可以使用xtype:'checkcolumn'到网格列来实现这一点。请参考以下内容:https://docs.sencha.com/extjs/7.6.0/classic/Ext.grid.column.Check.html
var store = Ext.create('Ext.data.Store', { data: [{ active: true }, { active: true }, { active: false }, { active: true }] }); Ext.create('Ext.grid.Panel', { height: 200, width: 400, renderTo: Ext.getBody(), store: store, columns: [{ xtype: 'checkcolumn', text: 'Status', dataIndex: 'active' }] });
nwlqm0z12#
您可以使用headerCheckboxconfig. configureastrue在标题文本下方显示复选框。单击复选框将选中/取消选中所有记录。
Ext.create('Ext.grid.Panel', { columns: [{ xtype: 'checkcolumn', headerCheckbox:true, }] });
2条答案
按热度按时间piah890a1#
你可以使用xtype:'checkcolumn'到网格列来实现这一点。请参考以下内容:https://docs.sencha.com/extjs/7.6.0/classic/Ext.grid.column.Check.html
nwlqm0z12#
您可以使用headerCheckboxconfig. configureastrue在标题文本下方显示复选框。
单击复选框将选中/取消选中所有记录。