\Kendo\UI\PivotGridV2

A PHP wrapper for Kendo UI PivotGridV2.

Inherits from \Kendo\UI\Widget.

Usage

To use PivotGridV2 in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo PivotGridV2

<?php
// Create a new instance of PivotGridV2 and specify its id
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');

// Configure it
$pivotGridV2->autoBind(true)

// Output it

echo $pivotGridV2->render();
?>

Methods

autoBind

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value boolean

Example

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->autoBind(true);
?>

collapseMember

Fired before column or row field is collapsed.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the collapseMember event documentation.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->collapseMember('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCollapseMember(e) {
        // handle the collapseMember event.
    }
</script>
<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->collapseMember('onCollapseMember');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->collapseMember(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnHeaderTemplate

The template which renders the content of the column header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding column header cell or tuple - the tuple of the corresponding column header cell. For information about the tuple structure check this link.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->columnHeaderTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->columnHeaderTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

columnWidth

The width of the table columns. Value is treated as pixels.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value float

Example

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->columnWidth(1);
?>

dataBinding

Fired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the dataBinding event documentation.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBinding('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBinding(e) {
        // handle the dataBinding event.
    }
</script>
<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBinding('onDataBinding');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBinding(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataBound

Fired after the widget is bound to the data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the dataBound event documentation.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBound('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBound(e) {
        // handle the dataBound event.
    }
</script>
<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBound('onDataBound');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataCellTemplate

The template which renders the content of the data cell. By default renders the formatted value (fmtValue) of the data item.The fields which can be used in the template are: columnTuple - the tuple of the corresponding column header cell; rowTuple - the tuple of the corresponding row header cell; measure - the value of the data cell measure or dataItem - the data item itself. For information about the tuple structure check this link. About the data item structure review this help topic.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataCellTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->dataCellTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

dataSource

Sets the data source of the widget.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value \Kendo\Data\DataSource|array

Example - using \Kendo\Data\DataSource

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$dataSource = new \Kendo\Data\DataSource();
$pivotGridV2->dataSource($dataSource);
?>

Example - using array

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$schema = new \Kendo\Data\DataSourceSchema();
$pivotGridV2->dataSource(array('schema' => $schema));
?>

expandMember

Fired before column or row field is expanded.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the expandMember event documentation.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->expandMember('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onExpandMember(e) {
        // handle the expandMember event.
    }
</script>
<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->expandMember('onExpandMember');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->expandMember(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

height

The height of the PivotGridV2. Numeric values are treated as pixels.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value float|string

Example - using float

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->height(1);
?>

Example - using string

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->height('value');
?>

If set to true the user could navigate the component using the keyboard navigation. By default keyboard navigation is disabled.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value boolean

Example

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->navigatable(true);
?>

pdf

Configures the Kendo UI PivotGridV2 PDF export settings.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value \Kendo\UI\PivotGridV2Pdf|array

Example - using \Kendo\UI\PivotGridV2Pdf

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pdf = new \Kendo\UI\PivotGridV2Pdf();
$author = 'value';
$pdf->author($author);
$pivotGridV2->pdf($pdf);
?>

Example - using array

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$author = 'value';
$pivotGridV2->pdf(array('author' => $author));
?>

pdfExport

Fired when the user clicks the "Export to PDF" toolbar button. For additional information check the pdfExport event documentation.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->pdfExport('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onPdfExport(e) {
        // handle the pdfExport event.
    }
</script>
<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->pdfExport('onPdfExport');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->pdfExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

rowHeaderTemplate

The template which renders the content of the row header cell. By default it renders the caption of the tuple member.The fields which can be used in the template are: member - the member of the corresponding row header cell or tuple - the tuple of the corresponding row header cell. For information about the tuple structure check this link.

Returns

\Kendo\UI\PivotGridV2

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$pivotGridV2 = new \Kendo\UI\PivotGridV2('PivotGridV2');
$pivotGridV2->rowHeaderTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

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