\Kendo\UI\GridContextMenu

A PHP class representing the contextMenu setting of Grid.

Methods

activate

Fires when a sub menu or the ContextMenu gets opened and its animation finished. ContextMenu Events.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$contextMenu->activate(new \Kendo\JavaScriptFunction('function() { }'));
?>

addBodyItem

Adds one or more GridContextMenuBodyItem to the GridContextMenu.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value[, $value2, ...] \Kendo\UI\GridContextMenuBodyItem|array

Example - using \Kendo\UI\GridContextMenuBodyItem

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$bodyItem = new \Kendo\UI\GridContextMenuBodyItem();
$command = 'value';
$bodyItem->command($command);
$contextMenu->addBodyItem($bodyItem);
?>

Example - using array

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$command = 'value';
$contextMenu->addBodyItem(array('command' => $command));
?>

Example - adding more than one GridContextMenuBodyItem

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$first  = new \Kendo\UI\GridContextMenuBodyItem();
$second = new \Kendo\UI\GridContextMenuBodyItem();
$contextMenu->addBodyItem($first, $second);
?>

close

Fires before a sub menu or the ContextMenu gets closed. You can cancel this event to prevent closure. ContextMenu Events.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$contextMenu->close(new \Kendo\JavaScriptFunction('function() { }'));
?>

deactivate

Fires when a sub menu or the ContextMenu gets closed and its animation finished. ContextMenu Events.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$contextMenu->deactivate(new \Kendo\JavaScriptFunction('function() { }'));
?>

addGroup

Adds one or more GridContextMenuGroup to the GridContextMenu.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value[, $value2, ...] \Kendo\UI\GridContextMenuGroup|array

Example - using \Kendo\UI\GridContextMenuGroup

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$group = new \Kendo\UI\GridContextMenuGroup();
$command = 'value';
$group->command($command);
$contextMenu->addGroup($group);
?>

Example - using array

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$command = 'value';
$contextMenu->addGroup(array('command' => $command));
?>

Example - adding more than one GridContextMenuGroup

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$first  = new \Kendo\UI\GridContextMenuGroup();
$second = new \Kendo\UI\GridContextMenuGroup();
$contextMenu->addGroup($first, $second);
?>

addHeadItem

Adds one or more GridContextMenuHeadItem to the GridContextMenu.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value[, $value2, ...] \Kendo\UI\GridContextMenuHeadItem|array

Example - using \Kendo\UI\GridContextMenuHeadItem

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$headItem = new \Kendo\UI\GridContextMenuHeadItem();
$command = 'value';
$headItem->command($command);
$contextMenu->addHeadItem($headItem);
?>

Example - using array

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$command = 'value';
$contextMenu->addHeadItem(array('command' => $command));
?>

Example - adding more than one GridContextMenuHeadItem

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$first  = new \Kendo\UI\GridContextMenuHeadItem();
$second = new \Kendo\UI\GridContextMenuHeadItem();
$contextMenu->addHeadItem($first, $second);
?>

open

Fires before a sub menu or the ContextMenu gets opened. You can cancel this event to prevent opening the sub menu. ContextMenu Events.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$contextMenu->open(new \Kendo\JavaScriptFunction('function() { }'));
?>

select

Fires when a menu item gets selected. ContextMenu Events.

Returns

\Kendo\UI\GridContextMenu

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$contextMenu = new \Kendo\UI\GridContextMenu();
$contextMenu->select(new \Kendo\JavaScriptFunction('function() { }'));
?>
In this article
Not finding the help you need?