如何在 Ext js 4.0 中调整网格大小时调用函数

How to call a function on when a grid is resized in Ext js 4.0?

本文关键字:网格 调整 小时 函数 调用 Ext js      更新时间:2023-09-26

在 Ext js 4.0 中调整网格大小时如何调用函数?

我正在尝试这样的事情,但它不起作用。

Ext.define('App.view.EDM.DataModelling.Entity.entitySymbol' ,{
extend: 'Ext.grid.Panel', 
alias   : 'widget.entitySymbol',
title:'Entity',
ddGroup : 'GridDDGroup',
hideHeaders : true,
stripeRows : false,
resizable : {
    resize : function(e ) {
        alert("hi1");
    },
    resizedrag : function(e ) {
        alert("hi2");
    },
    beforeresize : function(e ) {
        alert("hi3");
    }
    },  
floating:true,
draggable : true,   
loadMask : true,
height: 180,
width: 160

});

这些都不起作用。

您应该添加一个侦听器来调整事件大小

...
stripeRows : false,
listeners:{
  resize: function(this, width, height, oldWidth, oldHeight, eOpts){
     alert("hi4");
  }
},
...