Sets/gets the active highlight class class of the cell.
Default value is "igx-highlight__active"
.
let activeHighlightClass = this.cell.activeHighlightClass;
this.cell.activeHighlightClass = 'igx-cell-highlight_active';
Sets/gets the template of the cell.
<ng-template #cellTemplate igxCell let-value>
<div style="font-style: oblique; color:blueviolet; background:red">
<span>{{value}}</span>
</div>
</ng-template>
@ViewChild('cellTemplate',{read: TemplateRef})
cellTemplate: TemplateRef<any>;
this.cell.cellTemplate = this.cellTemplate;
let template = this.cell.cellTemplate;
Gets the column of the cell.
let cellColumn = this.cell.column;
Returns whether the cell is in edit mode.
Gets the cell formatter.
let cellForamatter = this.cell.formatter;
Sets/gets the highlight class of the cell.
Default value is "igx-highlight"
.
let highlightClass = this.cell.highlightClass;
this.cell.highlightClass = 'igx-cell-highlight';
Sets/get the role
property of the cell.
Default value is "gridcell"
.
this.cell.role = 'grid-cell';
let cellRole = this.cell.role;
Gets the row of the cell.
let cellRow = this.cell.row;
Gets the data of the row of the cell.
let rowData = this.cell.rowData;
Sets/gets the cell value.
this.cell.value = "Cell Value";
let cellValue = this.cell.value;
Gets the width of the cell.
let cellWidth = this.cell.width;
Gets the ID of the cell.
let cellID = this.cell.cellID;
Gets the index
of the cell column.
let columnIndex = this.cell.columnIndex;
Gets whether the cell column is selected.
let isCellColumnSelected = this.cell.columnSelected;
Gets the cell template context object.
let context = this.cell.context();
Returns a string containing the grid id
and the column field
concatenated by "_".
let describedBy = this.cell.describedBy;
Gets the current edit value while a cell is in edit mode. Only for cell editing mode.
let editValue = this.cell.editValue;
Sets the current edit value while a cell is in edit mode. Only for cell editing mode.
this.cell.editValue = value;
Returns whether the cell is editable.
Gets the grid of the cell.
let grid = this.cell.grid;
Gets the id
of the grid in which the cell is stored.
let gridId = this.cell.gridID;
Returns a reference to the nativeElement of the cell.
let cellNativeElement = this.cell.nativeElement;
Gets the cell template.
let template = this.cell.template;
Gets whether the cell is editable.
let isCellReadonly = this.cell.readonly;
Gets the index
of the row where the cell is stored.
let rowIndex = this.cell.rowIndex;
Gets whether the cell is selected.
let isSelected = this.cell.selected;
Selects/deselects the cell.
this.cell.selected = true.
Gets the cell template.
let template = this.cell.template;
Gets the visible index
of the in which the cell is stored.
let visibleColumnIndex = this.cell.visibleColumnIndex;
Gets the visible index
of the in which the cell is stored.
let visibleColumnIndex = this.cell.visibleColumnIndex;
Clears the highlight of the text in the cell.
this.cell.clearHighLight();
If the provided string matches the text in the cell, the text gets highlighted.
this.cell.highlightText('Cell Value', true);
Starts/ends edit mode for the cell.
cell.setEditMode(true);
Sets new value to the cell.
this.cell.update('New Value');
Providing reference to
IgxGridCellComponent
:@ViewChild('grid', { read: IgxGridComponent }) public grid: IgxGridComponent;
let column = this.grid.columnList.first;
let cell = column.cells[0];