Version

Client-Side Events

WebExplorerBar™ has a large variety of client-side events, which provides the developer with flexibility to create interactive applications. Here is a list of available events:

  • ItemClick – occurs whenever mouse click occurs for a group or item.

  • ItemHovered – occurs whenever a group or item is hovered.

  • ItemUnhovered – occurs whenever a group or item is unhovered.

  • ItemExpanding – occurs whenever a group or item is going to be expanded. This can be canceled.

  • ItemExpanded – occurs whenever a group or item has just expanded.

  • ItemCollapsing – occurs whenever a group or item is going to be collapsed. This can be canceled.

  • ItemCollapsed – occurs whenever a group or item has just been collapsed.

  • ItemPopulating – occurs before a group fetches its child items from the server. This can be canceled.

  • ItemPopulated – occurs after a group fetches its child items from the server.

Note
Note:

All these client-side events take a group or an item as event argument. You can get an instance of group or item for which the event is raised by calling getExplorerBarItem method.

The following example shows how to wire up to ItemClicked event:

In HTML:

<ig:WebExplorerBar ID="WebExplorerBar1" runat="server">
  <ClientEvents ItemClick="ItemClickHandler" />
    <Groups>
       <ig:ExplorerBarGroup Text="FirstGroup" Selected="true">
           <Items>
              <ig:ExplorerBarItem Text="FirstItem">
              </ig:ExplorerBarItem>
           </Items>
       </ig:ExplorerBarGroup>
    </Groups>
</ig:WebExplorerBar>

In Visual Basic:

Me.WebExplorerBar1.ClientEvents.ItemClick = "ItemClickHandler"

In C#:

this.WebExplorerBar1.ClientEvents.ItemClick = "ItemClickHandler";

In Javascript:

function ItemClickHandler(sender, args) {
    alert("You clicked " + args.getExplorerBarItem().get_text());
}