【问题标题】:How to add a checkbox column in a gridpanel in ExtJS3.4如何在 ExtJS3.4 的网格面板中添加复选框列
【发布时间】:2023-04-05 03:40:01
【问题描述】:

想在网格面板中添加一个复选框列。

我试过这个。

var sm = Ext.create('Ext.selection.CheckboxModel'); 

在网格中我正在配置它。 selModel: sm,

任何人都可以帮助我吗?

【问题讨论】:

    标签: extjs extjs3


    【解决方案1】:
        Please follow this code
        I am sure this code is working fine.
    
         var sm = new Ext.grid.CheckboxSelectionModel({
                    width: 25,
                    singleSelect: true,
                    header: ''
                });
    
    
         xtype: 'grid',
         sm: sm,
         store: store,
         trackMouseOver: true,
         cm: new Ext.grid.ColumnModel({
         defaultSortable: true,
             columns: [
                  sm,
              { dataIndex: 'record', header: 'Record' },
    
    
                          ]
    })
    

    【讨论】:

    • 我正在动态生成我的专栏。从 xml 获取列。
    猜你喜欢
    • 1970-01-01
    • 2014-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-25
    • 2012-08-25
    相关资源
    最近更新 更多