[CLOSED] Is it possible to display/open a closed module by clicking on a button in the navigation menu?

  1. #1

    [CLOSED] Is it possible to display/open a closed module by clicking on a button in the navigation menu?

    Hi,
    thank you for your reply, but the given examples did not solve the problem. As you can see in the screenshot, we want to display/open a closed module (which is neither displayd on the desktop, nor even loaded) by clicking on a button in the navigation menu?
    The modules should not be created at the desktop first.

    Please view attached screenshots:

    Attached Thumbnails Click image for larger version. 

Name:	modBareinnahmen.jpg 
Views:	13 
Size:	55.6 KB 
ID:	18811  
    Last edited by Daniil; Jan 30, 2015 at 2:40 PM. Reason: [CLOSED]
  2. #2
    Hi @idsonline,

    thank you for your reply, but the given examples did not solve the problem.
    It looks you somehow started a new thread rather than posting in the existing thread? Could you, please, provide a link to that thread?
  3. #3
    sorry, but i thougt this one was closed...
  4. #4
    Yes, we close thread if no update from the original poster for awhile. Though, please feel free to post any new and relevant information even in a closed thread.

    At this moment, I am not sure why this example doesn't help you.
    https://examples3.ext.net/#/Desktop/...ction/Overview

    Please clarify have you investigated how those "Render dynamic module" and "Render another module" works? Those shortcuts call DirectMethods. You can call a DirectMethod from anywhere, including a click handler of a Button inside the navigation menu.
  5. #5

    But we need to open modules (ascx files) without creating them on the desktop first.

    Hi,

    in your examples the modules are first created on the desktop and after that they can be launched.
    But we need to open modules (ascx files) without creating them on the desktop first.

    I've tried your solution from Jun 2010: (ThreadID: ID: 18642
    MyDesktop.Call("getModule('Comment').createWindow" );
    But this solution only works if the module is located on the desktop first.

    I also had a look at Thread: ID: 19661 from Jun 2012, because its the same issue. But this thread is still open and not solved.


    Link to our Dev Server: http://k2551.ims-firmen.de/jowi-trans/Desktop.aspx

    In order to be placed on the left side of the desktop, all modules should be placed in the right side bar as a button (see screeshot). They should not exist on the desktop. When cklicking on a button in the right side bar the selected module (=ascx file) has to open in a new window....

    Click image for larger version. 

Name:	jowi.jpg 
Views:	4 
Size:	86.9 KB 
ID:	18901
    thanx for your help
  6. #6
    There is the CreateWindow in the example that doesn't require a module to be created first and manually launched then.

    As for creating a module, you can create it programmatically as shown in the example and then you can also launch it:
    Desktop1.LaunchModule(moduleId);
  7. #7
    thank you,
    i've tried to use your Create Window example. But using the *.ascx file as a ComponentLoader.URL does not work. How can we display the *.ascx file inside this window. do we have to integrate the *.ascx file into an *.aspx file, or is there an easier way....

    We are still looking for an easy way to open a NOT LOADED module (*.ascx file) on the desktop module via a single button click

    [DirectMethod(ShowMask = true)]
        public void CreateWindow()
        {
            Desktop.GetInstance().CreateWindow(new Window
            {
                Title = "Bareinnahmen",
                Width = 300,
                Height = 300,
                CloseAction = CloseAction.Destroy,            
                Html = "The window is created",
                Loader = new ComponentLoader
                {
                    Url = "modules/Bareinnahmen.ascx",
                    Mode = LoadMode.Script,
                    AutoLoad = true
                }
            });
    thanx
    Last edited by Daniil; Jan 14, 2015 at 3:06 PM. Reason: Please use [CODE] tags
  8. #8
    You can do this.
    new Window
    {
        ContentControls =
        {
            this.LoadControl("UserControl.ascx")
        }
    }
    P.S. Please use [CODE] tags.
  9. #9
    Hi Daniil,
    thank you for your suggestion, i've tried different solutions, but the window did not open...

    My attempts:

        [DirectMethod(ShowMask = true)]
        public void CreateWindow_Bareinnahmen2()
        {
            Desktop.GetInstance().CreateWindow(new Window
            {
                Title = "Bareinnahmen",
                Width = 300,
                Height = 300,
                CloseAction = CloseAction.Destroy,
                Html = "The window is created",
                ContentControls =
                {
                    this.LoadControl("modules/Bareinnahmen.ascx")
                }
            });
        }

        [DirectMethod(ShowMask = true)]
        public void CreateWindow_Bareinnahmen()
        {
            Desktop.GetInstance().CreateWindow(new Window
                    {
                        ContentControls =
                        {
                            this.LoadControl("modules/Bareinnahmen.ascx")
                        }
                    });
        }

        [DirectMethod(ShowMask = true)]
        public void OpenBareinnahmen()
        {
            new Window
            {
                ContentControls =
                {
                    this.LoadControl("modules/Bareinnahmen.ascx")
                }
    
            };
            
        }
    thanx for your help,
    bG
    Christoph
  10. #10
    Please provide a full test case that we could copy, paste and run. Please remove all the things that is not required to reproduce the problem.

Similar Threads

  1. Replies: 5
    Last Post: Apr 26, 2016, 10:30 PM
  2. Replies: 3
    Last Post: Jan 13, 2015, 5:16 PM
  3. Replies: 4
    Last Post: Mar 04, 2014, 2:20 PM
  4. [CLOSED] How to display a button menu over <object> element?
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 07, 2013, 3:48 PM
  5. [CLOSED] When button click, open the menu of button
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2012, 4:23 PM

Tags for this Thread

Posting Permissions