New to Telerik UI for PHP? Download free 30-day trial

\Kendo\UI\GridColumnMenu

A PHP class representing the columnMenu setting of Grid.

Methods

columns

If set to true the column menu would allow the user to select (show and hide) grid columns. By default the column menu allows column selection.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value boolean|\Kendo\UI\GridColumnMenuColumns|array

Example - using boolean

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columnMenu->columns(true);
?>

Example - using \Kendo\UI\GridColumnMenuColumns

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columns = new \Kendo\UI\GridColumnMenuColumns();
$sort = 'value';
$columns->sort($sort);
$columnMenu->columns($columns);
?>

Example - using array

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$sort = 'value';
$columnMenu->columns(array('sort' => $sort));
?>

componentType

Specifies the component type of the column menu. "classic" - Uses the standard rendering of the column menu. or "modern" - Uses new rendering with a fresh and modern look and feel..

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value string

Example

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columnMenu->componentType('value');
?>

filterable

If set to true the column menu would allow the user to filter the grid. By default the column menu allows the user to filter if filtering is enabled via the filterable.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value boolean

Example

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columnMenu->filterable(true);
?>

messages

The text messages displayed in the column menu. Use it to customize or localize the column menu messages.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value \Kendo\UI\GridColumnMenuMessages|array

Example - using \Kendo\UI\GridColumnMenuMessages

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$messages = new \Kendo\UI\GridColumnMenuMessages();
$columns = 'value';
$messages->columns($columns);
$columnMenu->messages($messages);
?>

Example - using array

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columns = 'value';
$columnMenu->messages(array('columns' => $columns));
?>

sortable

If set to true the column menu would allow the user to sort the grid by the column field. By default the column menu allows the user to sort if sorting is enabled via the sortable option.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value boolean

Example

<?php
$columnMenu = new \Kendo\UI\GridColumnMenu();
$columnMenu->sortable(true);
?>
In this article
Not finding the help you need?