ツリー グリッド パネルにアクション列の定義があります。フォルダではアクション アイコンを非表示にしたいのですが、リーフ ノードでは別のアイコンを表示します。うまくやっていますが、「x-hide-display」を適用するとstyle 列自体が非表示になっていることにも気付きました。各列内にアイコンを表示したいだけです。ありがとう
this.columns = [{
xtype: 'treecolumn', //this is so we know which column will show the tree
text: 'Folder',
flex: 1,
sortable: true,
dataIndex: 'folder'
},{
text: '',
width: 20,
menuDisabled: true,
xtype: 'actioncolumn',
tooltip: 'View Chats',
align: 'center',
items:[{
icon: 'resources/images/comment.png',
getClass: function(value, metaData, record){
if(record.raw.leaf)
metaData.css = 'x-grid-icon'
else
metaData.css = 'x-hide-display';
}
}]
},{
text: '',
width: 20,
menuDisabled: true,
xtype: 'actioncolumn',
tooltip: 'View Alerts',
align: 'center',
items:[{
icon: 'resources/images/alert.png',
getClass: function(value, metaData, record){
if(record.raw.leaf)
metaData.css = 'x-grid-icon'
else
metaData.css = 'x-hide-display';
}
}]
},{
text: '',
width: 20,
menuDisabled: true,
xtype: 'actioncolumn',
tooltip: 'Favorite',
align: 'center',
items:[{
icon: 'resources/images/favorites.png',
getClass: function(value, metaData, record){
if(!record.raw.leaf)
metaData.css = 'x-grid-icon'
else
metaData.css = 'x-hide-display';
}
}]
},{
text: '',
width: 20,
menuDisabled: true,
xtype: 'actioncolumn',
tooltip: 'Share',
align: 'center',
items:[{
icon: 'resources/images/share.png',
getClass: function(value, metaData, record){
if(!record.raw.leaf)
metaData.css = 'x-grid-icon'
else
metaData.css = 'x-hide-display';
}
}]
}]