New to Kendo UI for Angular? Start a free 30-day trial
CellTemplateDirective
Represents the cell template of the PivotGrid.
Helps to customize the content of the cells. To define the cell template, nest an <ng-template>
tag with the
kendoPivotGridCellTemplate
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.expanded
—The expanded state of the cell. Use it as an alias for a template variable by utilizing thelet-expanded="expanded"
syntax.tableType
—The table type. Use it as an alias for a template variable by utilizing thelet-tableType="tableType"
syntax.text
—The default cell text. Use it as an alias for a template variable by utilizing thelet-text="text"
syntax.
html
<kendo-pivot-grid [data]="data" ...>
<ng-template kendoPivotGridCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
Row: {{rowIndex}}
</ng-template>
</kendo-pivot-grid>
Selector
[kendoPivotGridCellTemplate]