Aug 16, 2012, 2:58 PM
[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]