PDA

View Full Version : [CLOSED] MenuItem click event firing c# code behind.



GGage
Feb 26, 2013, 3:14 PM
Hello and thanks in advance!

Where can I find a sample of a MenuItem click event (DirectEvents?) calling a C# method in code behind ? I will also need to pass parameters on the call to the code behind.



Thank you
George

Vladimir
Feb 26, 2013, 3:43 PM
Hi,

Please see the following sample
http://examples2.ext.net/#/Toolbar/Menu/Overview/



<ext:MenuItem runat="server" Text="Menu 3">
<DirectEvents>
<Click OnEvent="Menu3_Click">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="Param" Value="Menu 3" Mode="Value" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:MenuItem>





protected void Menu3_Click(object sender, DirectEventArgs e) { X.MessageBox.Alert("Click", e.ExtraParams["Param"]).Show(); }

GGage
Feb 26, 2013, 4:40 PM
Thanks very much.

Works great.

George