New to Kendo UI for Angular? Start a free 30-day trial
ValueCellTemplateDirective
Represents the value cell template of the PivotGrid.
Helps to customize the content of the value cells. To define the value cell template, nest an <ng-template>
tag with the
kendoPivotGridValueCellTemplate
directive inside a <kendo-pivot-grid>
tag see example.
The template context is set to the current cell item and the following additional fields are passed:
cellItem
—The current cell item. Represents the default context that will be assigned to any template variable which utilizes thelet-x
syntax—for example,let-cellItem
.columnIndex
—The current column index. Use it as an alias for a template variable by utilizing thelet-columnIndex="columnIndex"
syntax.rowIndex
—The current data row index. Use it as an alias for a template variable by utilizing thelet-rowIndex="rowIndex"
syntax.tableType
—The table type. Use it as an alias for a template variable by utilizing thelet-tableType="tableType"
syntax.value
—The default cell value. Use it as an alias for a template variable by utilizing thelet-value="value"
syntax.
html
<kendo-pivot-grid [data]="data" ...>
<ng-template kendoPivotGridValueCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
Row: {{rowIndex}}
</ng-template>
</kendo-pivot-grid>
Selector
[kendoPivotGridValueCellTemplate]