\Kendo\UI\GridColumnCommandItem

A PHP class representing the commandItem setting of GridColumnCommand.

Methods

className

The CSS class applied to the command button.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value string

Example

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->className('value');
?>

click

The JavaScript function executed when the user clicks the command button. The function receives a jQuery Event as an argument.The function context (available via the this keyword) will be set to the grid instance.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value \Kendo\JavaScriptFunction

Example

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->click(new \Kendo\JavaScriptFunction('function() { }'));
?>

iconClass

The class for the web font icon of the button. When it is defined as an object it allows to customize the web font icon for the "edit", "update" and "cancel" command buttons.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value string|\Kendo\UI\GridColumnCommandItemIconClass|array

Example - using string

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->iconClass('value');
?>

Example - using \Kendo\UI\GridColumnCommandItemIconClass

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$iconClass = new \Kendo\UI\GridColumnCommandItemIconClass();
$cancel = 'value';
$iconClass->cancel($cancel);
$commandItem->iconClass($iconClass);
?>

Example - using array

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$cancel = 'value';
$commandItem->iconClass(array('cancel' => $cancel));
?>

name

The name of the command. The built-in commands are "edit" and "destroy". Can be set to a custom value.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value string

Example

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->name('value');
?>

template

The template of the command column.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value string

Example

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->template('value');
?>

text

The text displayed by the command button and the "cancel", "edit" and "update" texts of the edit command. If not set the name option is used as the button text.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value string|\Kendo\UI\GridColumnCommandItemText|array

Example - using string

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$commandItem->text('value');
?>

Example - using \Kendo\UI\GridColumnCommandItemText

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$text = new \Kendo\UI\GridColumnCommandItemText();
$cancel = 'value';
$text->cancel($cancel);
$commandItem->text($text);
?>

Example - using array

<?php
$commandItem = new \Kendo\UI\GridColumnCommandItem();
$cancel = 'value';
$commandItem->text(array('cancel' => $cancel));
?>

visible

The JavaScript function executed on initialization of the row which will determine whether the command button will be visible. The function receives a the data item object for the row as an argument.

Returns

\Kendo\UI\GridColumnCommandItem

Parameters

$value \Kendo\JavaScriptFunction

Example

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