View Full Version : Opening and Closing WIndow

11 Feb 2014, 7:07 AM
I have a window called from a grid that launches a window, If I launch just one window, I can drag it any where I want, but If I open the same window twice it becomes undraggable, how do I resolve this. Also if I call a close operation on this window, it closes just one of the window and leaves the other. Can anyone help with this ?

11 Feb 2014, 8:49 PM
Any tips or is the question not clear enough

12 Feb 2014, 12:40 AM
This sounds like what would happen if your window has an ID. Would that be correct?

If so, then creating two windows which share the same id would cause the problems you describe. To fix this, either leave the ID in place, but restrict the opening of only one window at a time - or remove the ID.

12 Feb 2014, 12:46 AM
You are absolutely correct, but how do you restrict that only one window can be open i.e. closing the previous one when opening a new window ?

12 Feb 2014, 1:04 AM
Well the simplest way would be to set modal:true on the window, which then masks the entire page until the window is closed.

Alternatively, in your code when you are creating the window, give the window a var name, then check if this is populated before creating another...


if(!win) {var win =new Ext.window({//config here})}

12 Feb 2014, 2:38 AM
Thanks a bunch