[CLOSED] Problem When try to hide a MenuCommand from a GridCommand

  1. #1

    [CLOSED] Problem When try to hide a MenuCommand from a GridCommand

    I have this structure on my Grid

    <ext:GridPanel ID="ConfigurationGrid" AutoHeight="true" runat="server" StripeRows="true" TrackMouseOver="true" MinColumnWidth="200" Layout="FitLayout" StoreID="ConfigurationStore">
        <ColumnModel>
            <Columns>
                <ext:Column DataIndex="Name" Width="170" />
                <ext:Column DataIndex="UpdatedOn" Width="100px" Align="Center" />
                <ext:CommandColumn Resizable="false" Width="75px" ButtonAlign="Center">
                    <Commands>
                        <ext:GridCommand Icon="AsteriskYellow" Text="Actions">
                            <Menu EnableScrolling="false">
                                <Items>
                                    <ext:MenuCommand Text="Edit" Icon="ApplicationEdit" CommandName="EditDefaultPage" />
                                    <ext:MenuCommand Text="Copy" Icon="ApplicationGet" CommandName="CopyDefaultPage" />
                                    <ext:MenuCommand Text="Delete" Icon="ApplicationDelete" CommandName="Delete" />
                                    <ext:MenuCommand Text="Export" Icon="ArrowRight" CommandName="Export"/>
                                    <ext:MenuCommand Text="Import" Icon="ArrowLeft" CommandName="Import" />
                                </Items>
                            </Menu>
                        </ext:GridCommand>
                    </Commands>
                 </ext:CommandColumn>
            </Columns>
        </ColumnModel>
        <LoadMask ShowMask="true"/>
        <Plugins>
            <ext:GridFilters runat="server" ID="managerConfigurationGridFilters" Local="true">
                <Filters>
                    <ext:StringFilter DataIndex="Name" />
                    <ext:StringFilter DataIndex="UpdatedOn" />              
                </Filters>
            </ext:GridFilters>
        </Plugins>
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />                            
        </SelectionModel>
        <BottomBar>
            <ext:PagingToolbar ID="PagingToolbar1" runat="server" DisplayInfo="true" DisplayMsg="Displaying plants {0} - {1} of {2}" PageSize="30"/>
        </BottomBar>
        <Listeners>
            <Command Handler="Grid_OnRowCommand(this, { command: command, data: record.data });" />
        </Listeners>
    </ext:GridPanel>
    And I want to hide the MenuCommand with the text "Export". Is there any way to do it by javascript or in code behind depending of one singular variable.?
    Last edited by Daniil; Aug 18, 2012 at 9:39 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use the PrepareToolbar handler.
    https://examples1.ext.net/#/GridPane...epare_Toolbar/

Similar Threads

  1. Replies: 7
    Last Post: Jun 17, 2014, 10:14 AM
  2. Enable listener for ext:MenuCommand
    By Hemavathi in forum 1.x Help
    Replies: 0
    Last Post: Apr 20, 2012, 11:37 AM
  3. [CLOSED] [1.0] Hide GridCommand in CommandColumn
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jun 10, 2011, 10:13 AM
  4. [CLOSED] Hide GridCommand based on data
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2010, 10:28 AM
  5. Hide gridcommand on serverside
    By mário in forum 1.x Help
    Replies: 0
    Last Post: Jul 12, 2010, 4:40 PM

Tags for this Thread

Posting Permissions