[CLOSED] how to fire a directevent on the command column?

  1. #1

    [CLOSED] how to fire a directevent on the command column?

    hi,
    I want to add a row above the current row when user click "add" command column and remove the current row when user click the "delete" comand column.
    i try to code
     <ext:CommandColumn runat="server" Text="操作">
                                            <Commands>
                                                <ext:GridCommand Icon="Delete" CommandName="delete">
                                                    <ToolTip Text="删除"></ToolTip>
                                                </ext:GridCommand>
                                                <ext:CommandSeparator/>
                                                <ext:GridCommand Icon="Add" CommandName="add">
                                                    <ToolTip Text="新增"></ToolTip>
                                                </ext:GridCommand>
                                            </Commands>
    </ext:CommandColumn>
    Last edited by Daniil; May 28, 2013 at 4:15 AM. Reason: [CLOSED]
  2. #2
    Hi @hdsoso,

    Please use a CommandColumn's Command DirectEvent.

    Do you really need a DirectEvent to delete and add a row? It can be done client side and you will avoid a request to server.

Similar Threads

  1. [CLOSED] Hot to fire a a grid command on client-side including toggle
    By blueworld in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 17, 2012, 1:53 PM
  2. [CLOSED] fire the DirectEvent ONLY when form is valid
    By Fahd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 07, 2012, 1:00 PM
  3. Replies: 9
    Last Post: Apr 25, 2012, 8:03 AM
  4. [CLOSED] Ext.net.DirectEvent.request don't fire my success function
    By emmanuel.sans.domenech in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 06, 2012, 10:32 AM
  5. [CLOSED] Fire directevent from javascript
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 15, 2011, 5:05 PM

Posting Permissions