EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件

 columns: [
                    { header: '序号', xtype: 'rownumberer', align: 'center', width: 100 },
                    { header: 'CompanyId', dataIndex: 'CompanyId', width: 100, hidden: true },
                    { header: '商家名称', dataIndex: 'CompanyName', width: 200 },
                    { header: '商家英文名称', dataIndex: 'CompanyEngName', width: 200 },
                    { header: '企业性质', dataIndex: 'NatureofBusiness', width: 200, hidden: true },
                    { header: '注册资产', dataIndex: 'CertifiedPublicAssets', width: 100, hidden: true },
                    { header: '会员编号', dataIndex: 'AccountID', width: 200, hidden: true },
                    { header: '企业文化', dataIndex: 'BusinessSlug', width: 200 },
                    {
                        header: '操作', align: 'left', width: 300, renderer:
                        function (v, nv, v1) {
                            var News = 'News'; var Article = 'Article'; var Entertain = 'Entertain'; var Download = 'Download';
                            var News = "" + "商家新闻汇总";
                            var Article = "" + "商家文章汇总";
                            var Entertain = "" + "商家娱乐汇总";
                            var Download = "" + "商家资料汇总";
                            return News + '' + Article + '' + Entertain + '' + Download;
                        }
                    }
        ],
    FunctionActionUpdate = function (ContentCategory) {
        alert(ContentCategory);     

        var width = document.getElementById('component').clientWidth;
        var height = document.getElementById('component').clientHeight;
        if (gridCompanyDetail.getSelectionModel().getSelection()[0] == null)
        { Ext.MessageBox.alert('提示', '请选择要编辑的记录!'); return; }
        else
        {
            //这里要跳转页面
            var subWindow = new Ext.Window({
                title: '窗口',
                width: width,
                height: height,
                modal: true,//模态的 后面的页面就不能点了 
                frame: true,
                layout: 'fit',
                closeAction: 'hide',
                closable: true,   //是否显示关闭按钮
                maximizable: true,//最大化
                minimizable: true,//最小化  
                listeners: {
                    minimize: function (subWindow, opts) {
                        subWindow.collapse();
                    }
                },
                html: '',

            });
            subWindow.show();
        }
    }

 

转载于:https://www.cnblogs.com/foreverfendou/p/4287438.html

你可能感兴趣的:(EXTJS 4.2 资料 控件之Grid Columns 列renderer 绑定事件)