Change an icon programmatically in a GridPanel ImageCommand

  1. #1

    Change an icon programmatically in a GridPanel ImageCommand

    I have a GridPanel with a column that contains some ImageCommand buttons. When the user clicks on a button, I want to change the iconCls so it displays a different icon. How can I know programmatically which button the user clicked on?
  2. #2

    RE: Change an icon programmatically in a GridPanel ImageCommand

    Last edited by geoffrey.mcgill; Jan 07, 2011 at 4:36 PM.
  3. #3

    RE: Change an icon programmatically in a GridPanel ImageCommand

    Vlad, thanks for the quick response, but the link you gave is not quite what I'm trying to do. I need to change the iconCls of the ImageCommand button when the user click on it. Here's what I have:

    
            <ext:ImageCommandColumn Width="100" Header="Image Cmds">
                            <Commands>
                                <ext:ImageCommand iconCls="minus" CommandName="Change0" />
                                <ext:ImageCommand iconCls="minus" CommandName="Change1" />
                            </Commands>
            </ext:ImageCommandColumn>
    
                <Listeners>
                    <Command Handler="if (command.iconCls == "minus") command.iconCls = "plus";else command.iconCls = "minus";/>
                </Listeners>

  4. #4

    Same Problem here

    im trying to perform same thing here but i reach to step where i need to get a reference to coloumn of a specific record.

    urgent help needed.
  5. #5
    Hi,

    Please clarify what toolkit's version do you use?

    Also please start a new forum thread on the Premium Help Forum.
  6. #6

    Is there a solution for this topic?

    I have the same problem - I would like to change the icon if the user clicks on it (into a hour glass or something similar, or alternatively hide the icon).
    I need this, because the click starts a long running procedure. In the success handler of the procedure I would like to reset the icon to the original one.

Similar Threads

  1. ImageCommand Icon
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Aug 26, 2011, 9:54 AM
  2. Set Icon ImageCommand
    By Maia in forum 1.x Help
    Replies: 1
    Last Post: Sep 06, 2010, 2:03 PM
  3. ImageCommand Icon not showing up
    By RPIRES in forum 1.x Help
    Replies: 5
    Last Post: Jun 21, 2010, 5:28 PM
  4. [CLOSED] [1.0] ImageCommand Icon
    By state in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 01, 2010, 6:36 PM
  5. Programmatically add and change controls
    By jonah in forum 1.x Help
    Replies: 12
    Last Post: Mar 15, 2008, 5:51 PM

Posting Permissions