| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > JavaScript: Применение библиотек > Ext.grid.GridPanel |
| Автор: Semeon 22.12.2009, 17:35 |
| Может кто подскажет хочу отловить окончание загрузки store дабы блокировать/разблокировать кнопки this.store.on("load", function(ds) {} не срабатывает, а вот "beforeload" работает( Grid3 = Ext.extend(Ext.grid.GridPanel, { region: 'center', loadMask: {msg: 'Загрузка...'}, loadMask: true, enableHdMenu : false, initComponent:function() { var gridId = this.id; Ext.apply(this, { tbar: new Ext.Toolbar ({ items: [ { text: 'Добавить', id: this.id+'_buttonAdd', icon: './images/icons/uploader_browse.gif', handler: this.buttonAdd.createDelegate(this) }, { text: 'Редактировать', id: this.id+'_buttonEdit', icon: './images/icons/action_postcomment.gif', handler: this.buttonEdit.createDelegate(this) }, { text: 'Удалить', id: this.id+'_buttonDel', icon: './images/icons/action_delete2.gif', handler: this.buttonDel.createDelegate(this) } ] }) }); this.store.on( "beforeload", function(ds, options) { Ext.getCmp(gridId+'_buttonAdd').setDisabled(true); Ext.getCmp(gridId+'_buttonEdit').setDisabled(true); Ext.getCmp(gridId+'_buttonDel').setDisabled(true); alert('beforeload'); } ); this.store.on("load", function(ds) { alert('load'); }); Grid3.superclass.initComponent.apply(this, arguments); } ,buttonAdd: function(button, e){} ,buttonEdit: function(button, e){} ,buttonDel: function(button, e){} }); Пожаловаться на это сообщение Удалить сообщение |
| Автор: comtat 22.12.2009, 18:27 | ||
Очень странно слышать что 'load' не работает |
| Автор: Semeon 22.12.2009, 19:03 |
| Попробовал так, но тоже не помогло((( Ext.apply(this, { store: new StoreDS( { url: './bd/PassportDeal.php', field: fieldPDPayments2, listeners: { 'load': { fn: function() { alert('load'); } } } }) }); |