PDA

View Full Version : Query related to Window destroy



itmajoor
3 Apr 2012, 10:15 PM
Hi All,
I am creating one Ext Window as shown following(Adding a grid using xtype).
I have queries related to Windows destroy method.

1. When we destroy the window(created in following code), do we have to call grid destroy method to destroy the grid?
2. Will the grid will be automatically destroy by EXTJs on destroy of Window?




Ext.create('Ext.window.Window', {
title: 'Hello',
height: 200,
width: 400,
layout: 'fit',
items: { // Let's put an empty grid in just to illustrate fit layout
xtype: 'grid',
border: false,
columns: [{header: 'World'}], // One header just for show. There's no data,
store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store
}
}).show();




Thanks in advance.

evant
3 Apr 2012, 10:18 PM
1) No, since the grid is a child item it will automatically be destroyed.
2) Yes, see #1.

itmajoor
3 Apr 2012, 10:26 PM
Hi evant,

One more query:
If i am extending Ext panel or window then in which case do we have to provide implantation of destroy?

Thanks