Extjs如何获取到grid的滚动条滚动到底部的事件?
Ext.define('Ext.view.arcHouse.CommunitySelect', {
extend: 'Ext.window.Window',
xtype: 'CommunitySelect',
id: 'CommunitySelect',
title: '选择小区',
controller: 'arcHouseCommunitySelect',
width: 800,
height:200,
//height: 600,
layout: 'fit',
items: [{
xtype: 'grid',
columnlines: true,
layout: 'fit',
id: 'CommunitySelectGrid',
store: Ext.create('Ext6.store.arcHouse.ArcCommunity'),
dockedItems: [{
xtype: 'container',
layout: 'form',
defaults: {
margin: '5 0 5 0',
//top的话,就是在文本框的上面,但right比较特殊,设置label紧挨着文本框,
labelAlign: 'right',
},
items: [{
xtype: 'textfield', id: 'communityXQMC', name: 'XQMC', fieldLabel: '小区名称', allowBlank: true, maxLength: 20
},{
xtype: 'treepicker', id: 'communityGID', name: 'GID', fieldLabel: '所属管辖', editable: false, emptyText: '请选择管辖', displayField: 'text', valueField: 'id', store: Ext.create('Ext6.store.domin.DominNoCity'), queryMode: 'local'
}],
}],
tbar: ['->', {
xtype: 'button',
text: '查询',
iconCls: 'Select',
handler: 'Select',
}, {
xtype: 'button',
text: '重置',
iconCls: 'Reset',
handler: 'Back',
},{
xtype: 'button',
text: '选择',
handler: 'Chose',
},
//{
// xtype: 'button',
// text: '取消',
// handler: 'Back',
//}
],
columns: [
{ xtype: 'rownumberer', text: '序号', width: 50 },
{ dataIndex: 'XQMC', text: '小区名称',width: 100, editable: false, sortable: false },
{ dataIndex: 'XQBH', text: '小区编号', width: 80, sortable: false, editable: false },
//{ dataIndex: 'GXMC', text: '行政管辖', width: 100, sortable: false, editable: false },
{ dataIndex: 'XQDZ', text: '小区地址', width: 150, sortable: false, editable: false, },
],
//尝试监控滚动条
listeners: {
//下面是我的尝试,均失败了
scroll: function (p) {
//p.body.on('scroll', function () {
Ext.Msg.alert("success");
//}, p);
},
renderer: function (p)
{
Ext.Msg.alert("success");
p.on('scroll', function ()
{
Ext.Msg.alert("success");
});
}
}
}],
});