Mar 10, 2015, 8:29 PM
[CLOSED] Command Column Disabled GridCommand in a Row
Hi team I want to disabled a GridCommand in a specified row, but, with my example I get to disable all GridCommand Column, BY example I want to disable the row number 2 in the GridCommand "Test1".
All this with a Button "btnDisableRow"
All this with a Button "btnDisableRow"
<ext:ResourceManager ID="rmDefault" runat="server" HideInDesign="true" />
<ext:GridPanel
ID="gpDefault"
runat="server"
Height="200"
Width="303">
<Store>
<ext:Store ID="sDefault" runat="server">
<Model>
<ext:Model ID="mDefault" runat="server">
<Fields>
<ext:ModelField Name="Column1" Type="String" />
<ext:ModelField Name="Column2" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<TopBar>
<ext:Toolbar ID="tbDefault" runat="server">
<Items>
<ext:Button ID="btnEnable" Text="Disable Command 1" runat="server">
<Listeners>
<Click Handler="App.ccPrueba.commands[0].disabled = true; App.gpDefault.reconfigure();" />
</Listeners>
</ext:Button>
<ext:Button ID="btnDisable" Text="Enable Command 1" runat="server">
<Listeners>
<Click Handler="App.ccPrueba.commands[0].disabled = false; App.gpDefault.reconfigure();" />
</Listeners>
</ext:Button>
<ext:Button ID="btnDisableRow" Text="Disable Row 2" runat="server">
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<ColumnModel>
<Columns>
<ext:Column ID="cColumna1" runat="server" DataIndex="Column1" Text="Column1" />
<ext:Column ID="cColumna2" runat="server" DataIndex="Column2" Text="Column2" />
<ext:CommandColumn
ID="ccPrueba"
runat="server">
<Commands>
<ext:GridCommand CommandName="Test1" Icon="Accept" />
<ext:GridCommand CommandName="Test2" Icon="Add" />
</Commands>
</ext:CommandColumn>
</Columns>
</ColumnModel>
</ext:GridPanel>
Last edited by Daniil; Mar 17, 2015 at 1:50 PM.
Reason: [CLOSED]