我看的是Ext3.4的 \examples\grid 下的 paging.js
效果 就是将数据 渲染成链接 并对链接的 href 传递参数
columns:[{
id: 'topic', // id assigned so we can apply custom css (e.g. .x-grid-col-topic b { color:#333 })
header: "Topic",
dataIndex: 'title',
width: 420,
renderer: renderTopic,
sortable: true
},
这是topic列 渲染函数为renderTopic
function renderTopic(value, p, record){
return String.format(
'<b><a href="http://extjs.com/forum/showthread.php?t={2}" target="_blank">{0}</a></b><a href="http://extjs.com/forum/forumdisplay.php?f={3}" target="_blank">{1} Forum</a>',
value, record.data.forumtitle, record.id, record.data.forumid);
}
这是渲染函数
我一直搞不明白 这些参数value p record 是怎么传递过来的呢 ?