columns: [{header:' Serial number ', Xtype: ' Rownumberer ', align: ' center ', width:100}, {header:' CompanyID ', dataindex: ' CompanyID ', width:100, Hidden:true}, {header:' Merchant name ', Dataindex: ' CompanyName ', width:200}, {header:' Merchant English name ', Dataindex: ' Companyengname ', width:200}, {header:' Business nature ', Dataindex: ' natureofbusiness ', width:200, Hidden:true}, {header:' Registered assets ', Dataindex: ' Certifiedpublicassets ', width:100, Hidden:true}, {header:' Member Number ', Dataindex: ' AccountID ', width:200, Hidden:true}, {header:' Corporate culture ', Dataindex: ' Businessslug ', width:200}, {header:' Operation ', align: ' left ', width:300, renderer:function(V, NV, v1) {varNews = ' News ';varArticle = ' article ';varentertain = ' entertain ';varDownload = ' Download '; varNews = "</img>" + "<a href= ' # ' onclick= ' Functionactionupdate (\ "+ News +" \ ") ' > Business News Summary </a>"; varArticle = "</img>" + "<a href= ' # ' onclick= ' Functionactionupdate (\ "+ article +" \ ") ' > Merchant Article Summary </a> '; varentertain = "</img>" + "<a href= ' # ' onclick= ' Functionactionupdate (\ "+ entertain +" \ ") ' > Merchant Entertainment summary </a> '; varDownload = "</img>" + "<a href= ' # ' onclick= ' Functionactionupdate (\ "+ Download +" \ ") ' > Business Information Summary </a> '; returnNews + ' + article + ' + entertain + ' +Download; } } ],
Functionactionupdate =function(contentcategory) {alert (contentcategory); varwidth = document.getElementById (' Component '). clientwidth; varHeight = document.getElementById (' Component '). clientheight; if(Gridcompanydetail.getselectionmodel (). GetSelection () [0] = =NULL) {Ext.MessageBox.alert (' Hint ', ' Please select the record you want to edit! ' ‘);return; } Else { //here to jump page varSubwindow =NewExt.window ({title:Window, Width:width, Height:height, modal:true,//The back page of the modal cannot be ordered.Frametrue, layout:' Fit ', Closeaction:' Hide ', closable:true,//whether to show the Close buttonMaximizable:true,//maximizedMinimizable:true,//minimization oflisteners: {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 Data Control grid Columns column renderer binding event