Extjs4.2 给grid行添加button

    var grid = Ext.create('Ext.grid.Panel', {
        title: '详细信息',
        store: Ext.data.StoreManager.lookup('employeeStore'),
        columns: [
            { text: '姓名', dataIndex: 'Name' },
            {
                header: "操作",
                dataIndex: 'name3',
                renderer: function () { return '<button type="button">Click Me!</button>'; }
            },
            { text: '年龄', dataIndex: 'Age' },
            { text: '居住地', dataIndex: 'Address' }
        ],
        layout:'fit',
        forceFit: true
    });

猜你喜欢

转载自www.cnblogs.com/LY-CS/p/12750166.html
今日推荐