Flexicious Ultimate provides a toolbar at the bottom of the grid, which is basically a container for the paging, drill up/down, filter, footer, print and export buttons. We also provide a hook for you to plug in buttons for your custom actions, as well as a way to enable/disable those buttons in response to selection in the grid. Let’s examine the code:
Here is how you add a Toolbar Action:
grid.toolbarActions.addItem(new
ToolbarAction("Edit",1,"","Edit
Record","../assets/images/edit.png",true,false));
Basically, you add a new ToolBar action to the toolbarActions collection of the grid, specifying:
name :Name of the toolbar action
level: Nest Depth of the level to enable the toolbar action for. Nest Depths
Start at 1.
code: The Code associated with the tool bar action, not required.
tooltip: The hover over tooltip when the user hovers over the image specified
by the icon url
iconUrl: The image to use
for the toolbar action.
seperatorBefore: Whether or not to draw a separator before the toolbar action
seperatorAfter: Whether or
not to draw a separator after the toolbar action
The next step is to specify what should happen when the action icon is clicked, and also to specify the conditions when to enable or disable the icons. We do this via:
toolbarActionExecutedFunction : A function that gets executed whenever a user clicks on a icon generated by a custom toolbar icon. This function should take a ToolbarAction object, a target object (which could be the ImageButton that triggered the action), and a IExtendedPager object and return void.
toolbarActionValidFunction: A function that gets executed whenever the user selection changes.This function should take a ToolbarAction object, a target object (which could be the ImageButton that triggered the action), and a IExtendedPager object and return Boolean.