[CLOSED] Panel Loader Url change on MenuItem Click

  1. #1

    [CLOSED] Panel Loader Url change on MenuItem Click

    Hello,

    Don't know if I'm going at this the right way but... I am trying to change A panels Loader.Url on a MenuItem click event on the same page.

    This is the code I'm using. The page_load logic seems to work fine, but the itemClick method does not do aynthing.


    [MARKUP]
    <ext:Menu ID="Menu1" runat="server" Floating="false" Layout="HBoxLayout" ShowSeparator="false" Cls="horizontal-menu">
        <Defaults>
            <ext:Parameter Name="MenuAlign" Value="tl-bl?" Mode="Value" />
        </Defaults>
        <Items>
            <ext:MenuItem ID="MenuItem1" runat="server" Icon="User" Text="Employee Data">
                <Menu>
                    <ext:Menu ID="Menu2" runat="server" ShowSeparator="false">
                        <Items>
                            <ext:MenuItem Text="Job History" Icon="ReportEdit" >
                                <DirectEvents>
                                    <Click OnEvent="itemClick">
                                        <EventMask ShowMask="true" />
                                        <ExtraParams>
                                            <ext:Parameter Name="Param1" Value="JobHistory" Mode="Value" />
                                        </ExtraParams>
                                        </Click>
                                </DirectEvents>
                            </ext:MenuItem>
                            <ext:MenuItem Text="Custom" Icon="CogStart" >
                                <DirectEvents>
                                    <Click OnEvent="itemClick">
                                        <ExtraParams>
                                            <ext:Parameter Name="Param1" Value="Custom" Mode="Value" />
                                        </ExtraParams>
                                    </Click>
                                </DirectEvents>
                            </ext:MenuItem>
                        </Items>
                    </ext:Menu>
                </Menu>
            </ext:MenuItem>
        </Items>
    </ext:Menu>
    
    <ext:Panel ID="Panel1" runat="server" Border="false" Height="630" >
        <Loader ID="Loader1" runat="server" 
            AutoLoad="true" DisableCaching="true"  
            Mode="Frame"
            Url="" >
        </Loader>
    </ext:Panel>

    public static String cCurrentEECode = "";
    
    protected void Page_Load(object sender, EventArgs e)
    {
        string param1 = Request.QueryString["a"];
        if (param1 != null)
        {
            cCurrentEECode = param1;
        }
    
        if (!IsPostBack)
        {
            Panel1.Loader.Url = "~/Human Resources/People/employeeMain.aspx?a=" + cCurrentEECode; 
            Panel1.Loader.DataBind();
        }
    }   // eof - Page_Load
    
    
    protected void itemClick(object sender, DirectEventArgs e)
    {
        String cUrl = "";
        String cMenuClicked = e.ExtraParams["Param1"].ToString().Trim();
    
        if (cMenuClicked == "JobHistory") cUrl = "~/Human Resources/People/Demographics/frmJobHistory.aspx?a=" + cCurrentEECode;
        if (cMenuClicked == "Custom") cUrl = "~/Human Resources/People/Demographics/frmCustom.aspx?a=" + cCurrentEECode;
    
        this.Panel1.Loader.Url = cUrl;
        this.Panel1.Loader.DataBind();
    }   // eof - itemClick(obj....

    Thanks
    George
    Last edited by Daniil; Mar 04, 2013 at 1:56 PM. Reason: [CLOSED]
  2. #2
    Call 'LoadContent' for Panel after Url changing
    Please see
    https://examples2.ext.net/#/Panel/Basic/Loader/
  3. #3
    Hello!

    George, can you please do not forget about CODE tag, it makes your code much more readable.
  4. #4
    First let me say yall are the best support team I have ever had the pleasure of dealing with. Thank you very much for the help!

    Daulet, once again I appoligze for the poor post format. First where do I use the CODE tag. where I used [MARKUP]? I also have figured out when I paste from VisualStudio the indentation is removed. This i can control.


    Thanks again..
    George
  5. #5
    More information about posting in the forums can be found in the following locations:

    http://forums.ext.net/showthread.php...ing-New-Topics

    http://forums.ext.net/showthread.php...ation-Required

    When posting code samples, please wrap the code samples in [CODE] tags. Content within [CODE] tags will be parsed and formatted making them easier to read.
    Geoffrey McGill
    Founder
  6. #6
    Quote Originally Posted by GGage View Post
    First let me say yall are the best support team I have ever had the pleasure of dealing with. Thank you very much for the help!

    Daulet, once again I appoligze for the poor post format. First where do I use the CODE tag. where I used [MARKUP]? I also have figured out when I paste from VisualStudio the indentation is removed. This i can control.


    Thanks again..
    George
    Yes, there were two mistakes with formatting but it's OK, no problem :)
  7. #7
    Hello George,

    Please clarify, can we mark the thread as closed or you still need our assistance?
  8. #8
    Sorry, Please mark as closed.

    Thanks
    George

Similar Threads

  1. Click a Menu:menuitem from a different panel
    By gdog_5021 in forum 2.x Help
    Replies: 1
    Last Post: May 08, 2013, 6:30 PM
  2. Replies: 1
    Last Post: Feb 13, 2013, 5:30 AM
  3. [CLOSED] Loader double-click error
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 08, 2012, 11:48 AM
  4. How to get parent menuItem when click menuItem?
    By zhangsir199 in forum 1.x Help
    Replies: 2
    Last Post: Jan 21, 2011, 2:58 AM
  5. Replies: 2
    Last Post: Oct 22, 2010, 11:04 AM

Tags for this Thread

Posting Permissions