I have problem with z-index (i think) in ExtJS. While drag and drop element from GridPanel to DataView I drop element over GridPanel and it dropped to DataView. But DataView have place under the GridPanel, and this imposible! Thx! (problem in all browsers)
Asked
Active
Viewed 1.9k times
2 Answers
14
Have you tried setting the z-index of your item to a higher order? ie.
Ext.Msg.show({
title:'Request Failed',
msg:"Error, The request was not found in the database",
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
Ext.MessageBox.getDialog().getEl().setStyle('z-index','80000');

Brian Moeskau
- 20,103
- 8
- 71
- 73

Chesneycar
- 545
- 16
- 43
-
This worked for me just as you described. I needed the message box to appear over the loading mask and this did the trick – Matt N May 25 '11 at 15:58
-
1@Bosvark Where does the `80000` come from? +1ed! – Joseph Victor Zammit Jul 16 '12 at 21:44
-
indeed, @Chesney Where does the 80 000 come from? Just a 'high' number? – VDP Sep 16 '15 at 11:09
-
1@VDP you are correct, I just set to a very high number -- You can put in any number you want. 80K was just an example number. – Chesneycar Sep 17 '15 at 12:45
2
Windows
If you want to manage the zIndex for windows you can use the Ext.WindowManager
. All windows are registered automatically to the window manager so you can do:
Ext.WindowManager.bringToFront(component)
or get the next zIndex
Ext.WindowManager.getNextZSeed()
All floating components
If the issue is with other floating components like the dragging stuff you can register the present components to a zIndexManager
var zIndexManager = new Ext.ZIndexManager;
zIndexManager.register(compA);
zIndexManager.register(compB);
Then you can do:
zIndexManager.sendToBack(comp);
zIndexManager.bringToFront(comp);
or manage it with:
zIndexManager.getNextZSeed();

VDP
- 6,340
- 4
- 31
- 53