View Full Version : Help With Menu Panel Parameters

Nov 03, 2009, 1:52 PM
I have a menu panel with multiple menu items. I can see js model for the menu panel and it's items during runtime, but am unable to figure out parameter names for the menu panel. What parameter to I need to send during MenuItemClick?

Also, the parameters have tripped me up more than once, so I'm wondering if there's a parameter reference for the controls, or if I've overlooked some other resource for the information?


Rick Spaulding

Nov 04, 2009, 10:23 AM
Have you checked out the Toolbar pages in Example Explorer? What kind of parameters do you want to send? Here's a simple example of sending parameters to AjaxEvent. It can be applied to any AjaxEvents for any controls.

<script runat="server">

Public Sub MenuItemClick(ByVal sender As Object, ByVal e As AjaxEventArgs)
Dim param1 = e.ExtraParams("param1")
Dim param2 = e.ExtraParams("param2")

Ext.MessageBox.Alert("Test", String.Format("param1='{0}', param2='{1}'", param1, param2)).Show()
End Sub

<asp:Panel runat="server" ID="pnlTools" Height="50px">
<ext:Toolbar runat="server" ID="wsTools">
<ext:Button runat="server" ID="btn" Text="Select">
<ext:Menu ID="Menu1" runat="server">
<ext:MenuItem ID="MenuItem1" runat="server" Text="MenuItem1">
<ext:MenuItem ID="MenuItem2" runat="server" Text="MenuItem2">
<ItemClick OnEvent="MenuItemClick">
<ext:Parameter Name="param1" Value="param1" Mode="Value">
<ext:Parameter Name="param2" Value="menuItem.id" Mode="Raw">