StartMenu

  1. #1

    StartMenu

    Hi,
    i have a problem,
    i need to add new MenuItem to StartMenu dinamically from ad UserControl.

    the code of my userControl
    void Page_Load(object sender, EventArgs e)
    {
        initModule();
    }
     
    protected override void initModule()
    {
        createElementToMainMenu();
    }
    private void createElementToMainMenu()
    {
        Ext.Net.MenuItem rootItem = ((Ext.Net.MenuItem)getMainDesktop().FindControl(gapMenuElement.RootMenuItemId));
        rootItem.Menu[0].Items.Add(gapMenuElement)
    }
    What's wrong?

    the load of userControl into aspx page
    protected void Page_Load(object sender, EventArgs e)
    {
       string uCname = moduleXml.SelectSingleNode("uc-name").InnerText + ".ascx";
       CustomModule gapUserControl = Page.LoadControl("modules_uc/" + uCname) as CustomModule;
       gapUserControl.ID = uCname;
     
       this.Controls.Add(gapUserControl);
     
       string desktopModuleID = moduleXml.SelectSingleNode("window-id").InnerText;
       Ext.Net.DesktopWindow dWind = this.FindControl(gapUserControl.ID).FindControl(desktopModuleID) as Ext.Net.DesktopWindow;
     
       this.Controls.Add(dWind);
    }

    help please.

    thank to all.
  2. #2
    It works at first time, but when click F5, does not work....

    anyone can help me?

    please
  3. #3
    no one knows why the reload page with F5 doesn't work?
  4. #4
    Hi,

    Please provide a full, but simplified, sample to reproduce the problem.

Similar Threads

  1. StartMenu V2
    By Kaveh in forum 2.x Help
    Replies: 4
    Last Post: Jul 03, 2012, 8:11 AM
  2. Add MenuItem to StartMenu dinamically
    By sant3 in forum 1.x Help
    Replies: 1
    Last Post: Sep 19, 2011, 8:31 PM
  3. StartMenu Title
    By threewonders in forum 1.x Help
    Replies: 2
    Last Post: Mar 17, 2011, 5:07 PM
  4. [CLOSED] Startmenu position
    By albayrak in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 30, 2011, 10:13 AM
  5. StartMenu
    By flaviodamaia in forum 1.x Help
    Replies: 1
    Last Post: Feb 11, 2009, 9:16 AM

Tags for this Thread

Posting Permissions