0 extjs4
我正在使用一个网格面板,我需要在其中创建一个列作为链接(它应该看起来像链接 - 没有动作).我正在使用网格面板中的监听器,并点击一个单元格,它的工作正常.唯一的事情是第1列应该看起来像一个链接.但是如何把href ="#"我不确定.这是我的代码:
var addressDetailsStore = Ext.create('Ext.data.Store', {
id:'addressDetailsStore',
autoLoad: true,
fields:
[
'addressType',
'street1',
'street2',
'province',
'city',
'country'
],
proxy: {
type: 'ajax',
url: 'resources/json/addressDetails.json', // url that will load data with respect to start and limit params
reader: {
type: 'json',
root: 'items',
}
}
});
Ext.define('iOMS.view.common.addressView', {
extend: 'Ext.grid.Panel',
alias: 'widget.AddressViewPanel',
layout: 'fit',
collapsible: true,
title:'Address',
store: addressDetailsStore,
listeners:{
cellclick:function (iView, iCellEl, iColIdx, iRecord, iRowEl, iRowIdx, iEvent){
// Getting the event and I am doing logic here..
Run Code Online (Sandbox Code Playgroud)
}
我只是想'addressType'列看起来像一个链接,我不知道在哪里放href ...感谢您的回复.-Praveen
您还可以使用模板列:
columns: [
{ text: 'External Link', xtype: 'templatecolumn', tpl: '<a href="{url}">{title}</a>'}
]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4083 次 |
| 最近记录: |