Ext. onready (function () {var DATA = [1, 'easyweb', 'easyjf', 'www .easyjf.com '], [2, 'jfox', 'huihoo ', 'www .huihoo.org '], [3, 'jdon', 'jdon', 'www .jdon.com'], [4, 'springne', 'springne ', 'www .springside.org.cn ']; var store = new Ext. data. simplestore ({data: data, fields: ["ID", "name", "Organization", "Homepage"]}); var Colm = new Ext. grid. columnmodel ([{header: "project name", dataindex: "name", sortable: true}, {header: "Development Team", dataindex: "Organization", sortable: true}, {header: "url", dataindex: "Homepage", Renderer: showurl}]); var grid = new Ext. grid. gridpanel ({renderto: "hello", title: "China Java open source products and teams", height: 200, width: 600, CM: Colm, store: store, autoexpandcolumn: 2}) ;}); function showurl (value) {return "<a href = 'HTTP: // "+ value +" 'target = '_ blank'> "+ value +" </a> ";}
Note the showurl function here!