View Full Version : DirectEvents Window outside scope of calling component

Jun 13, 2012, 9:47 AM

I am creating windows via DirectEvents which is working well. But once I have a window open, and want to open a nested modal window it appears within the constrains of the panel from which the DirectEvent call was made.

My code for creating the window from an MVC controller is:

public ActionResult Edit(string modelName, string className, string id, string listID)
Window w = new Window(c.name, UIUtil.StringToIcon(c.icon));
w.Width = 800;
w.Height = 600;
w.Modal = true;
w.ID = "window1";

w.Closable = false;
w.Resizable = false;
w.Layout = "Fit";
string s = w.ToScript();
return new AjaxResult(s);

and my code to create the window (from a gridPanel) is:

gp.DirectEvents.CellDblClick.Url = "/edit/" + modelName + "/" + className + "/" + id;
gp.DirectEvents.CellDblClick.EventMask.ShowMask = true;
gp.DirectEvents.CellDblClick.ExtraParams.Add(new Parameter("id", "Ext.encode(this.store.getAt(rowIndex).data.id)", ParameterMode.Raw));
gp.DirectEvents.CellDblClick.ExtraParams.Add(new Parameter("listID", gp.ID));

The window is created but it is constrained to the bounds of the gridpanel .. and as a result you can't really see it.

Is there a way to make it pop up on top of all other components?? I would like to keep the calls as DirectEvents and using code-behind without Javascript calls if possible!!


Stuart W