EXTJS 4.2 資料 控制項之Grid Columns 列renderer 綁定事件

來源:互聯網
上載者:User

標籤:

 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 = "<img src=‘/Resources/Images/16x16/blue16_020.gif‘></img>" + "<a href=‘#‘ onClick=‘FunctionActionUpdate(\"" + News + "\")‘>商家新聞匯總</a>";                            var Article = "<img src=‘/Resources/Images/16x16/blue16_020.gif‘></img>" + "<a href=‘#‘ onClick=‘FunctionActionUpdate(\"" + Article + "\")‘>商家文章匯總</a>";                            var Entertain = "<img src=‘/Resources/Images/16x16/blue16_020.gif‘></img>" + "<a href=‘#‘ onClick=‘FunctionActionUpdate(\"" + Entertain + "\")‘>商家娛樂匯總</a>";                            var Download = "<img src=‘/Resources/Images/16x16/blue16_020.gif‘></img>" + "<a href=‘#‘ onClick=‘FunctionActionUpdate(\"" + Download + "\")‘>商家資料匯總</a>";                            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: ‘<iframe style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; width: "100%"; height:"100%"; border-right-width: 0px" src=/ProjectWeb/Page/InformationManagement/IM_BS_CompanyGather.html?ContentCategory=‘ + ContentCategory + ‘ frameborder="0" width="100%"  height="100%"scrolling="no"></iframe>‘,            });            subWindow.show();        }    }

 

EXTJS 4.2 資料 控制項之Grid Columns 列renderer 綁定事件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.