Note: You don't need RowAction + RowActions, use only RowActions. I keep RowAction here only as a reference for users who already used it.

-------- Original post follows -------

Hi folks,

this plugin has been around on the Premium Help Forum for some time and I'm keeping referencing it in some of my answers so I thought that it would deserve it's own thread.

What is it for? Imagine you need some icons in a grid that you want to bind some actions to: delete row, edit row, whatever. That is exactly what this plugin makes easy. It displays an icon and fires two events: beforeaction (return false to cancel) and action (here you put the action you want to execute). Arguments to event contain reference to grid, record of store of row being clicked and index of row.

Code of plugin:

PHP Code:

// vim: ts=4:sw=4:nu:fdc=2:nospell/** * RowAction plugin for Ext grid * * Contains renderer for an icon and fires events when icon is clicked * * @author Ing. Jozef Sakalos <jsakalos at aariadne dot com> * @date December 29, 2007 * @version $Id: Ext.ux.grid.RowAction.js 126 2008-01-31 03:33:50Z jozo $ * * @license Ext.ux.grid.RowAction is licensed under the terms of * the Open Source LGPL 3.0 license. Commercial use is permitted to the extent * that the code/component(s) do NOT become part of another Open Source or Commercially * licensed development library or toolkit without explicit permission. * * License details: http://www.gnu.org/licenses/lgpl.html */

I tried creating two instances but the my action listener seems to get called for all the instance. For example if I have 2 instances (a delete and a rollback button). When I click on the "rollback" button the delete action gets executed and vice versa.

Saki,
It looks really nice, but out of curiosity how difficult would it be to allow multiple actions to be in the same column? To take it to the final wish list step would it be possible to put an action item in the middle of a field while using a custom renderer on a grid column?

Saki,
It looks really nice, but out of curiosity how difficult would it be to allow multiple actions to be in the same column? To take it to the final wish list step would it be possible to put an action item in the middle of a field while using a custom renderer on a grid column?

Thanks Saki. That is part of what I'm looking for. Also, I was thinking if you can put an action in a custom renderer (of course I would have to put a certain class name around the action button div) then I'll be able to put an action button in a grid grouping row.

Saki,
I guess I wasn't specific enough on my last question. After thinking about it more there are no troubles since (on my renderer) I can easily mimic the div structure on your renderer without having to add a new column.