EO.Web ToolBar supports both server and client side events.
Handling Client Side Event
By default EO.Web ToolBar only raises client side event. The following table lists
all client events:
| Event |
Remark |
|
ClientSideOnItemClick
|
Occurs when a tool bar item is clicked. The following code
demonstrates how this event is used:
function on_item_click(toolBar, toolBarItem)
{
window.alert("ToolBar item '" +
toolBarItem.getCommandName() + "' clicked.");
}
<eo:ToolBar ClientSideOnItemClick="on_item_click" ....>
....
</eo:ToolBar>
|
|
ClientSideBeforeSubMenuExpand
|
Use this property to modify the drop down menu before the sub menu is displayed. The
following code demonstrates how this event is used:
function before_submenu_expand(toolBar, toolBarItem, subMenu)
{
var menuItem = subMenu.getItemByIndex(0);
menuItem.setText("New item text!");
}
<eo:ToolBar ClientSideBeforeSubMenuExpand="before_submenu_expand" ....>
....
</eo:ToolBar>
|
Handling Server Side Event
EO.Web ToolBar can raise server side ItemClick
event when AutoPostBack is set to true.
Handling this event is no different than handling any other server event.