function showUrl(value) {
return "<a href="+value+">"+value+"</a>";
}//增加链接
Ext.onReady(function() {
var data = [[1, 'EasyJWeb', 'EasyJF', 'www.easyjf.com'],
[2, 'jfox', 'huihoo', 'www.huihoo.org'],
[3, 'jdon', 'jdon', 'www.jdon.com'],
[4, 'springside', 'springside', 'www.springside.org.cn']];
var store = new Ext.data.SimpleStore({
data : data,
fields : ["id", "name", "organization", "homepage"]
});
var colM = new Ext.grid.ColumnModel([{
header : "项目名称",
dataIndex : "name",
sortable : true
}, {
header : "开发团队",
dataIndex : "organization",
sortable : true
}, {
header : "网址",
dataIndex : "homepage",
renderer : showUrl
}]);
var grid = new Ext.grid.GridPanel({
renderTo : "hello",
title : "中国Java开源产品及团队",
height : 200,
width : 600,
cm : colM,
store : store,
autoExpandColumn : 2
});
});
return "<a href="+value+">"+value+"</a>";
}//增加链接
Ext.onReady(function() {
var data = [[1, 'EasyJWeb', 'EasyJF', 'www.easyjf.com'],
[2, 'jfox', 'huihoo', 'www.huihoo.org'],
[3, 'jdon', 'jdon', 'www.jdon.com'],
[4, 'springside', 'springside', 'www.springside.org.cn']];
var store = new Ext.data.SimpleStore({
data : data,
fields : ["id", "name", "organization", "homepage"]
});
var colM = new Ext.grid.ColumnModel([{
header : "项目名称",
dataIndex : "name",
sortable : true
}, {
header : "开发团队",
dataIndex : "organization",
sortable : true
}, {
header : "网址",
dataIndex : "homepage",
renderer : showUrl
}]);
var grid = new Ext.grid.GridPanel({
renderTo : "hello",
title : "中国Java开源产品及团队",
height : 200,
width : 600,
cm : colM,
store : store,
autoExpandColumn : 2
});
});