[CLOSED] Gridcommand replace Icon and disable command

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Gridcommand replace Icon and disable command

    Hi,

    I have an imagecommandcolum with a directevent on the grid.
    If the directevent is fired I need to update the commandimage and disable the command. How can I do that.


                        <ext:ImageCommandColumn ID="colOrderFinished" runat="server" Width="30">
                            <Commands>
                                <ext:ImageCommand Icon="SportGolfPractice" CommandName="cmdDocumentsChecedTrue" Hidden="false" IconCls="">
                                </ext:ImageCommand>
                                <ext:ImageCommand Icon="SportGolf" CommandName="cmdDocumentsChecedFalse" Hidden="true">
                                </ext:ImageCommand>
                            </Commands>
                            <DirectEvents>
                                <Command OnEvent="cmdOrderFinished">
                                    <ExtraParams>
                                    </ExtraParams>
                                </Command>
                            </DirectEvents>
                            <Listeners>
                                <command Handler="finishOrder(record, command);" />
                            </Listeners>
                        </ext:ImageCommandColumn>
    I tried something like that, but now the direktevent fires doesn't fires anymore
    and the icon don't changed.


     function finishOrder(record, command) {
                column.commands(0).hidden = true;
              
                debugger;
                if (command.command == 'cmdDocumentsChecedTrue') {
                    command.hidden = true;
                }
                if (command.command == 'cmdDocumentsChecedFalse') {
                    command.hidden = false;
                }
                record.disableCommand = true;
                //this.view.refreshRow(this.store.indexOf(record));
                // GridPanel1.getView().refresh()
            }
    Thanks for help.
    Last edited by Daniil; Apr 24, 2013 at 1:05 PM. Reason: [CLOSED]

Similar Threads

  1. Replies: 7
    Last Post: Jun 17, 2014, 10:14 AM
  2. [CLOSED] Disable GridCommand of a gridPanel on Command Click
    By otouri in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 16, 2013, 1:43 PM
  3. Replies: 0
    Last Post: May 03, 2012, 2:21 AM
  4. Replies: 1
    Last Post: Apr 11, 2012, 12:52 PM
  5. [CLOSED] disable/enable gridcommand
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 03, 2009, 2:25 PM

Posting Permissions