\Kendo\UI\GridToolbarItem
A PHP class representing the toolbarItem setting of GridToolbar.
Methods
iconClass
The class for the web font icon of the button that will be rendered in the toolbar.
Returns
\Kendo\UI\GridToolbarItem
Parameters
$value string
Example
<?php
$toolbarItem = new \Kendo\UI\GridToolbarItem();
$toolbarItem->iconClass('value');
?>
name
The name of the toolbar command. Either a built-in ("cancel", "create", "save", "excel", "pdf") or custom. The name is reflected in one of the CSS classes, which is applied to the button - k-grid-name. This class can be used to obtain reference to the button after Grid initialization and attach click handlers.
Returns
\Kendo\UI\GridToolbarItem
Parameters
$value string
Example
<?php
$toolbarItem = new \Kendo\UI\GridToolbarItem();
$toolbarItem->name('value');
?>
template
The template which renders the command. By default renders a button.
Returns
\Kendo\UI\GridToolbarItem
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string
<?php
$toolbarItem = new \Kendo\UI\GridToolbarItem();
$toolbarItem->template('value');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$toolbarItem = new \Kendo\UI\GridToolbarItem();
$toolbarItem->template(new \Kendo\JavaScriptFunction('function() { }'));
?>
text
The text displayed by the command button. If not set the name` option would be used as the button text instead.
Returns
\Kendo\UI\GridToolbarItem
Parameters
$value string
Example
<?php
$toolbarItem = new \Kendo\UI\GridToolbarItem();
$toolbarItem->text('value');
?>