Holds an array of menu items.

Example of an event menu:

menu.items = [
{text:'Open', onClick: function(args) { var e = args.source; var command = args.item.command; alert('Opening event (id ' + e.value() +')'); } },
{text:'Send', onClick: function(args) { var e = args.source; var command = args.item.command; alert('Sending event (id ' + e.value() +')'); } },
{text:'-' },  // separator
{text:'Delete (CallBack)', command: 'Delete', action: 'CallBack' },
{text:'Delete (PostBack)', command: 'Delete', action: 'PostBack' },
{text:'Open Google', href: '{0}' }];

Menu Item Structure

The menu item object has the following properties:

  • text (required): The menu item text to be displayed. Use "-" to show a separator.
  • href (optional): The URL to be opened on menu item click. The "{0}" string will be replaced with the event id.
  • onClick (optional): JavaScript function to be called on menu item click. The menu source object (event or time range) is stored in args.source, the menu item can be accessed using args.item.
  • command (optional): The command to be invoked on the server side (EventMenuClick or TimeRangeMenuClick event)
  • action (optional): Method of invoking the menu item command on the server side: "CallBack" or "PostBack" ("CallBack" is the default value) - only applies to ASP.NET WebForms, ASP.NET MVC and Java versions
  • disabled (optional): If set to true the menu item will be marked as disabled with "*_item_disabled" CSS class and no action will be fired on click (since version 8.0.1591)
  • image (optional): URL of the menu item icon
  • items (optional): array of submenu items
  • cssClass (optional): Custom CSS class that will be added to the menu item (since version 8.2.3146)

Only one type of menu click action is invoked. The order of processing is as follows:

  • href
  • onclick
  • command

Menu item examples

JavaScript action

{text:'Open', onclick: function() { var e = this.source; var command = this.item.command; alert('Opening event (id ' + e.value() +')'); } }


{text:'-' }

Server-side action invoked using CallBack

{text:'Delete (CallBack)', command: 'Delete', action: 'CallBack' }

Server-side action invoked using PostBack (ASP.NET only)

{text:'Delete (PostBack)', command: 'Delete', action: 'PostBack' }


{text:'Open Google', href: '{0}' }