Setting GridCommand name upon rendering according to store data

  1. #1

    Setting GridCommand name upon rendering according to store data

    Hi,

    I am using GridCommand on my grid to create command button named Activate:

       <ext:CommandColumn ID="CommandColumn" Text="Action" runat="server" Width="160">
                                        <Commands>
                                            <ext:GridCommand CommandName="Activate" Text="Activate"/>
                                        </Commands>
                                        <Listeners>
                                            <Command Handler="HandleCommand(command, record);" />
                                        </Listeners>
                                    </ext:CommandColumn>

    What i need to achieve is the ability to change the command text according to the match row data in the Store
    of this grid (so sometimes it will be named Activate and sometimes Deactivate)
    Also i need to be able to identify which state the command is in order to handle it diffrently when pressed.
  2. #2
    Hello @eitanby!

    Please check this example, I'm confident it highlights exactly the feature you want to explore!
    - GridPanel - Commands - Prepare commands

    Well, and while you are at it, take your time to browse the examples. There are a lot but I'm sure if you give them a quick look, the next time you need something you'll remember you have seen that in the examples and then you could save yourself a lot of trouble guessing how to do something with Ext.NET! :)

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] infinite scrolling / gridcommand rendering problem
    By tMp in forum 2.x Legacy Premium Help
    Replies: 11
    Last Post: Oct 10, 2013, 10:05 AM
  2. [CLOSED] GridPanel Store not rendering to show data
    By pawangyanwali in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 16, 2012, 4:14 AM
  3. [CLOSED] Hide GridCommand based on data
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2010, 10:28 AM
  4. Replies: 0
    Last Post: Jul 28, 2010, 1:47 PM
  5. Help with Store & GridCommand
    By jidaneri in forum 1.x Help
    Replies: 8
    Last Post: Jan 25, 2010, 7:22 PM

Tags for this Thread

Posting Permissions