すべてのグリッドパネルに selectionchange イベントが必要です。
1 つのページにいくつかのグリッドがあるため、currentGrid を取得して何かを行う必要があります。
そのような :
var activeGrid
selectionchange:function(){
activeGrid = this;
}
次に、currentGrid を取得できます。ありがとう
Ext.override('Ext.grid.Panel', {
initComponent: function(config) {
this.callOverridden(arguments);
this.on({
selectionchange: this.mySelectionFunction,
scope: this
});
},
mySelectionFunction: function() {
// Do your stuff here
}
});
これについて説明が必要ですか?
この質問を見てください: ExtJS 4 でコントローラーの継承を実行する方法は?
ビュー/コントローラーで基本機能を作成する方法の例をいくつか投稿しました。お探しのものが見つかると思います。