May 18, 2015, 2:53 PM
Error when show and hide a window multiple time
Hi All,
I am working with Ext.Net 3.1 with ASP.NET MVC 5 (RAZOR). I have a javascript error when i show and i hide a window multiple times:
Window Definition:
The user control (partial view) contains a treepanel and a button that should reload the tree into the container AsvTree using DirectEvents.
PartialTreeView.cshtml:
Controller Method:
I am working with Ext.Net 3.1 with ASP.NET MVC 5 (RAZOR). I have a javascript error when i show and i hide a window multiple times:
TypeError: ac.dom is null
..."display","none"),aa,af;if(ae){return 0}aa=ac.dom.offsetHeight;if(Ext.supports.D...
In my example, i have a window "WindowTree" have a single item loaded by ItemsFromPartial method wich use a user control contained in a cshtml file.Window Definition:
@(Html.X().Window()
.ID("WindowTree")
.Hidden(true)
.Height(680)
.Width(700)
.Items(X.Container().ID("AsvTree").ItemsFromPartial("PartialTreeView"))
The user control (partial view) contains a treepanel and a button that should reload the tree into the container AsvTree using DirectEvents.
PartialTreeView.cshtml:
X.TreePanel().ID("AsvTreePanel")
.Flex(1)
.Height(600)
.Mode(TreePanelMode.Remote)
.RootVisible(false)
.BottomBar(X.Toolbar().Items(
X.Button().ID("LoadDisabled").Text("Load").DirectEvents(e =>
{
e.Click.Url = Url.Action("PartialTreeView");
e.Click.ExtraParams.Add(new { containerId = "AsvTree"});
}))
The following method is called by the DirectEvents in order to prepare the new tree.Controller Method:
public Ext.Net.MVC.PartialViewResult PartialTreeView(string containerId)
{
var result = new Ext.Net.MVC.PartialViewResult()
{
ContainerId = containerId,
WrapByScriptTag = false,
ClearContainer = true
};
return result;
}
The error appears almost random when i call App.WindowTree.show() and App.WindowTree.hide();
Last edited by draliassaf; May 18, 2015 at 3:48 PM.
Reason: repect guideline