グリッド/ツリーのitemcontextmenuのリスナーを追加すると、ビューレコード、アイテム、インデックスにアクセスできますが、列を取得するにはどうすればよいですか?
私が作成したいのはcontextMenuですが、ユーザーが最初の列の項目をクリックした場合のみです。
これが私のリスナー関数です:
firstColumnContext: function(view,record,item,index,e,eOpts) {
console.log(view);
console.log(record.getName());//this works
console.log(index);
console.log('get column');//
},
私のコンセプトは次のようになります。
firstColumnContext: function(view,record,item,index,e,eOpts) {
e.stopEvent();
if(record.get('leaf') && 'first column')
{
//show context menu here
}
},
しかし、前に書いたように、右クリックが最初の列にあるかどうかを確認する必要があります。