PDA

View Full Version : [CLOSED] how to fire a directevent on the command column?



hdsoso
May 24, 2013, 2:48 AM
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>

Daniil
May 24, 2013, 5:01 AM
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.