Aug 17, 2009, 2:39 PM
Add additional parameter to Grid.Command event
Currently, the Grid.Command event exposes the command, record, and rowIndex. Is it possible to add an additional parameter for the actual item (menu, button, etc) clicked? For example, on an item click, I want to change the grid command icon.
Here's a sample use case:
1. Each grid row shows a project (name, description, status).
2. Status is a CommandColumn with a menu. The menu items are Mark Approved, Mark Complete, etc.
3. On menu item click, I want to change the icon of the grid command to reflect the new status.
If the Command event exposes the button clicked, I can get the iconCls of the button and set its' parent's parent's icon to it.
Here's a sample use case:
1. Each grid row shows a project (name, description, status).
2. Status is a CommandColumn with a menu. The menu items are Mark Approved, Mark Complete, etc.
3. On menu item click, I want to change the icon of the grid command to reflect the new status.
If the Command event exposes the button clicked, I can get the iconCls of the button and set its' parent's parent's icon to it.