\Kendo\UI\GridColumnMenu

A PHP class representing the columnMenu setting of Grid.

Methods

autoSize

If set to true the column menu would allow the user to fit one or all columns to the width of their content. This setting is available only when the tabbed componentType is used.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value boolean

Example

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

clearAllFilters

If set to true, the global column menu will render a button to allow the user to clear all filters applied to the grid.

Returns

\Kendo\UI\GridColumnMenu

Parameters

$value boolean

Example

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

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.; "modern" - Uses new rendering with a fresh and modern look and feel. or "tabbed" - Uses the rendering of the "modern" menu, but splits its content into different tabs..

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();
$apply = 'value';
$messages->apply($apply);
$columnMenu->messages($messages);
?>

Example - using array

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

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?