[CLOSED] V2.0 ToolBar Button

  1. #1

    [CLOSED] V2.0 ToolBar Button

    Hi, please help my to disable - enable the button in a toolbar..

    in a versione 1.2 client-side javascript myButton.setDisabled(false) work, but in 2.0 retrive an error.

    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <ext:Viewport ID="Viewport1" runat="server" Layout="border">
            <Items>
                <ext:Panel ID="Panel1" runat="server" Region="West" Width="200" BodyPadding="3" Layout="FitLayout">
                    <Items>
                        <ext:GridPanel ID="GridPanelUtenti" runat="server" Title="Archivio utenti">
                            <Store>
                                <ext:Store runat="server" ID="StoreUtenti">
                                    <Model>
                                        <ext:Model ID="Model1" runat="server" IDProperty="UteId">
                                            <Fields>
                                                <ext:ModelField Name="UteId" />
                                                <ext:ModelField Name="UteUte" />
                                                <ext:ModelField Name="UteEma" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                            <ColumnModel>
                                <Columns>
                                    <ext:Column runat="server" ID="UteUte" DataIndex="UteUte" Align="Left" Flex="1" Text="Utenti" />
                                </Columns>
                            </ColumnModel>
                            <SelectionModel>
                                <ext:RowSelectionModel>
                                   <Listeners>
                                    <Select  Handler="enableButton(record);" />
                                   </Listeners>
                                </ext:RowSelectionModel>
                            </SelectionModel>
                        </ext:GridPanel>
                    </Items>
                </ext:Panel>
                <ext:FormPanel ID="FormPanelUtenti" runat="server" ButtonAlign="Right" Height="185"
                    BodyPadding="10" Padding="3" Title="Utente" Region="Center" Flex="1">
                    <Items>
                        <ext:TextField ID="TextField1" runat="server" AnchorHorizontal="100%" FieldLabel="Label">
                        </ext:TextField>
                    </Items>               
                    <BottomBar>
                        <ext:Toolbar runat="server" ID="ToolBarUtenti" >
                            <Items>
                             <ext:Button ID="ButtonNew" runat="server" Text="Nuovo"  
                                        Scale="Medium" IconUrl="Images/24/new24.png" ToolTip="Crea un nuovo utente." Disabled="True">
                        </ext:Button>
                        <ext:Button ID="ButtonEdit" runat="server" Text="Modifica" Disabled="true" 
                                        Scale="Medium" IconUrl="Images/24/edit24.png" ToolTip="Modifica l'utente selezionato.">
                        </ext:Button>
                        <ext:Button ID="ButtonDelete" runat="server" Text="Cancella" 
                                        Scale="Medium" IconUrl="Images/24/delete24.png" ToolTip="Cancella l'utente selezionato.">
                        </ext:Button>
                               <ext:ToolbarFill />
                        <ext:Button ID="ButtonSave" runat="server" Text="Salva" 
                                        Disabled="true" Scale="Medium" IconUrl="Images/24/save24.png" ToolTip="Salva le modifiche apportate">
                        </ext:Button>
                        <ext:Button ID="ButtonCancel" runat="server" Text="Annulla" Disabled="true" 
                                        Scale="Medium"  IconUrl="Images/24/cancel24.png" ToolTip="Annulla le modifiche apportate">
                        </ext:Button>
                            </Items>
                        </ext:Toolbar>
                    </BottomBar>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
        </form>
        <script type="text/javascript">
    
            function enableButton (record) {
    
                if (record != null) {
                    ButtonEdit.setDisabled(false);
                  
                }
    
            };
        
        </script>
    </body>
    I have test with:

    ButtonEdit.isDisabled
    ButtonEdit.setDisabled
    ButtonEdit.disable

    but the button is always disabled.

    In the sample: http://examples2.ext.net/#/Form/Misc...dit_Form_View/
    the button save is always disable, i have the same problem..

    tnks

    Aurelio
    Last edited by Daniil; Jan 23, 2012 at 9:26 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Please see:
    http://forums.ext.net/showthread.php...ll=1#post73029

    We will add a respective CHANGELOG item.

    Update

    The respective CHANGELOG item #90 has been added.
    http://examples2.ext.net/#/Getting_S...nts/CHANGELOG/
    Last edited by Daniil; Jan 24, 2012 at 1:21 PM.
  3. #3
    Thanks Daniil...is work OK

    App.ButtonDelete.setDisabled(false);

    Now Print the entire log and append on my Monitor !!! :)

    Thanks

    Aurelio

Similar Threads

  1. [CLOSED] How to disable coolite toolbar button
    By Vasudhaika in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 24, 2012, 5:52 AM
  2. Bug adding Ext Button to a ToolBar
    By garag in forum 1.x Help
    Replies: 1
    Last Post: Sep 28, 2011, 3:19 PM
  3. Replies: 0
    Last Post: Feb 01, 2010, 5:44 AM
  4. [CLOSED] [1.0] Insert button into toolbar...
    By state in forum 1.x Premium Help
    Replies: 10
    Last Post: Oct 23, 2009, 7:25 PM
  5. [CLOSED] Paging Toolbar without refresh button?
    By Sharon in forum 1.x Premium Help
    Replies: 2
    Last Post: Jul 20, 2009, 10:11 AM

Posting Permissions