Window doesn't show when created from code behind.

  1. #1

    Window doesn't show when created from code behind.

    I'm having problems with defining a window and showing it from code behind. For example:

    var win = new Window()
                {
                    ID = "MyWindow",
                    Title = "My Window",
                    Width = Unit.Pixel(800),
                    Height = Unit.Pixel(600),
                    Modal = true,
                    AutoRender = false,
                    Collapsible = true,
                    Maximizable = true,
                    Hidden = true,
                    CloseAction = Ext.Net.CloseAction.Destroy,
                    Loader = new ComponentLoader
                    {
                        Url = url,
                        Mode = LoadMode.Frame,
                        AutoLoad = true,
                        LoadMask =
                        {
                            ShowMask = true
                        }
                    }
                };
    
                this.Form.Controls.Add(win);
    calling win.Show() doesn't show it. I'm developing using .NET 4 ASP.NET, Visual Studio 2010, C#.

    What could be the problem?

    Thanks in advance.
    Last edited by geoffrey.mcgill; Apr 10, 2012 at 3:14 PM. Reason: please use [CODE] tags
  2. #2
    Hi,

    Your code sample worked perfectly for me. I was able to call win.Show() on the Window and it rendered correctly, loading the inner page.
    Geoffrey McGill
    Founder
  3. #3
    If you create window during DirectEvent then please investigate the following sample
    https://examples2.ext.net/#/XRender/Basic/New_Window/
  4. #4
    Thank you for the reply.

    Yes I am invoking it from a direct method. I'll try your solution Vladimir.

    Thanks very much.

Similar Threads

  1. Replies: 0
    Last Post: Aug 01, 2012, 1:20 AM
  2. Replies: 2
    Last Post: Mar 22, 2012, 12:49 PM
  3. Replies: 3
    Last Post: Mar 19, 2012, 12:35 PM
  4. Replies: 4
    Last Post: Mar 16, 2012, 11:40 AM
  5. [CLOSED] Window Created in Code Behind does not show
    By sisa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 09, 2011, 2:13 PM

Tags for this Thread

Posting Permissions