Help With Menu Panel Parameters

  1. #1

    Help With Menu Panel Parameters

    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?


    Thanks,


    Rick Spaulding
    groovepoets@hotmail.com
  2. #2

    RE: Help With Menu Panel Parameters



    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
        </script>
    
    
        <asp:Panel runat="server" ID="pnlTools" Height="50px">
            <ext:Toolbar runat="server" ID="wsTools">
                <Items>
                    <ext:Button runat="server" ID="btn" Text="Select">
                        <Menu>
                            <ext:Menu ID="Menu1" runat="server">
                                <Items>
                                    <ext:MenuItem ID="MenuItem1" runat="server" Text="MenuItem1">
                                    </ext:MenuItem>
                                    <ext:MenuItem ID="MenuItem2" runat="server" Text="MenuItem2">
                                    </ext:MenuItem>
                                </Items>
                                <AjaxEvents>
                                    <ItemClick OnEvent="MenuItemClick">
                                        <ExtraParams>
                                            <ext:Parameter Name="param1" Value="param1" Mode="Value">
                                            </ext:Parameter>
                                            <ext:Parameter Name="param2" Value="menuItem.id" Mode="Raw">
                                            </ext:Parameter>
                                        </ExtraParams>
                                    </ItemClick>
                                </AjaxEvents>
                            </ext:Menu>
                        </Menu>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </asp:Panel>

Similar Threads

  1. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  2. Add Menu Panel Dynamically in Panel
    By archana in forum 1.x Help
    Replies: 4
    Last Post: Oct 27, 2011, 10:38 AM
  3. Add Menu Panel Dynamically in Panel
    By archana in forum 1.x Help
    Replies: 2
    Last Post: Oct 14, 2011, 9:53 AM
  4. Ext .net Menu Panel dynamically created
    By garag in forum 1.x Help
    Replies: 1
    Last Post: Oct 14, 2011, 9:50 AM
  5. [CLOSED] [1.0] Panel AutoLoad Parameters Bug
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 08, 2010, 9:59 AM

Posting Permissions