EXTJS grid 单选框

阅读更多
Ext.define('MyApp.view.MyGridPanel', {
    extend: 'Ext.grid.Panel',

    requires: [
        'Ext.grid.column.Number',
        'Ext.grid.column.Date',
        'Ext.grid.column.Boolean',
        'Ext.grid.View'
    ],

    height: 250,
    width: 400,
    title: 'My Grid Panel',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            columns: [
                {
                    xtype: 'gridcolumn',
                    dataIndex: 'string',
                    text: 'String'
                },
                {
                    xtype: 'numbercolumn',
                    dataIndex: 'number',
                    text: 'Number'
                },
                {
                    xtype: 'datecolumn',
                    dataIndex: 'date',
                    text: 'Date'
                },
                {
                    xtype: 'booleancolumn',
                    dataIndex: 'bool',
                    text: 'Boolean'
                }
            ]
        });
		//单选框
		me.selModel = Ext.create('Ext.selection.CheckboxModel',{mode:'SINGLE','allowDeselect':true});
        me.callParent(arguments);
    }

});

 

你可能感兴趣的:(JavaScript,extjs,grid)