EXTJS4.2——4.1Grid添加按钮控件

参考文档:https://blog.csdn.net/zhizhuomsj/article/details/51460040

                {
                    header: '操作', width: 190, align: 'center', sortable: false,
                    renderer: function (value, metaData, record) {
                        var bflag = false;
                        var id = metaData.record.id;//Ext.id();
                        metaData.tdAttr = 'data-qtip="提示信息"';
                        Ext.defer(function () {
                            Ext.widget('toolbar', {
                                renderTo: id,
                                dock: 'top',
                                style: 'margin:0',
                                ui: 'footer',
                                height: 40,
                                width: 190,
                                items: [
                                {
                                    text: '导出',
                                    width:80,
                                    menu: {
                                        xtype: 'menu',
                                        plain: true,
                                        items: {
                                            xtype: 'buttongroup',
                                            title: '單據導出',
                                            columns: 2,
                                            defaults: {
                                                xtype: 'button',
                                                scale: 'large',
                                                iconAlign: 'left',
                                            },
                                            items: [{
                                                colspan: 2,
                                                width: '100%',
                                                text: 'IQC單據導出',
                                                scale: 'small',
                                                width: Ext.themeName === 'neptune' ? 175 : 140
                                            }, {
                                                colspan: 2,
                                                width: '100%',
                                                text: 'HE單據導出',
                                                scale: 'small',
                                                width: Ext.themeName === 'neptune' ? 175 : 140
                                            }, {
                                                colspan: 2,
                                                width: '100%',
                                                text: 'PH單據導出',
                                                scale: 'small',
                                                width: Ext.themeName === 'neptune' ? 175 : 140
                                            }]
                                        }
                                    }
                                },
                                {
                                    xtype: 'button',
                                    width: 80,
                                    height: 25,
                                    text: '上传',
                                    handler: function () {

                                        //相应事件方法
                                    }
                                }
                                ]
                            });
                        }, 50);
                        return Ext.String.format('<div id="{0}"></div>', id);
                    }

                }

EXTJS4.2——4.1Grid添加按钮控件

上一篇:Extjs PDF在线预览(无需控件)


下一篇:EDA中级-Kaggle学习2-特征工程序章