Error when show a window multiple time

  1. #1

    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:

    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
  2. #2
  3. #3
    Hi @draliassaf,

    Welcome to the Ext.NET forums!

    Could you, please, provide a full runnable test case to reproduce the problem? I would investigate.

Similar Threads

  1. DragDrop multiple items at a time
    By Rupesh in forum 1.x Help
    Replies: 0
    Last Post: Nov 28, 2013, 9:50 AM
  2. Gauge Questions [Multiple Colors, Time]
    By jdroberson in forum 2.x Help
    Replies: 1
    Last Post: Feb 12, 2013, 7:08 AM
  3. Replies: 3
    Last Post: Mar 19, 2012, 12:35 PM
  4. [CLOSED] Problem opening multiple tabpanels the same time.
    By majunior in forum 1.x Legacy Premium Help
    Replies: 58
    Last Post: Jun 01, 2011, 8:39 PM
  5. Replies: 4
    Last Post: Apr 25, 2011, 8:35 AM

Tags for this Thread

Posting Permissions