Centering WIndow over Grid

I am trying to attach an event for a window to pop up over my main grid. Right now the grid is cutting off part of the window due to z-positioning.

Here is my code for initializing the window

		w1 = dhxWins.createWindow("w1", 50, 70, 400, 500);
		w1.setModal(true);
		w1.centerOnScreen();
		w1.setText("Physical - " + Name);
		w1.addUserButton("close", 6, "close", close)

Thanks.

You init grid in some container (f.e. Tabbar):

grid = tabbar.cells("info").attachGrid();

In the same container you may attach your viewport:

dhxWins.attachViewportTo(tabbar.cells("info"));


Ok I added the attachToViewport code. It helped get the windows from loading to the side of the grid. Now I have the problem that the grid is on top of the window hiding the window. I have tried pulling the window forward with the bringToTop window function but it didn’t help.

Any thoughts on how to pull the window forward.

Got it to show over the grid now. Changed the position attribute of the style to absolute. It was relative. Right away it works.

Thank you for the help.

You are welcome!