Feb 26, 2013, 9:24 PM
[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]
Thanks
George
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]