\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() { }'));
?>

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');
?>

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() { }'));
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve the information

close
Dummy