Class ϴIgxGridCellComponent

Providing reference to IgxGridCellComponent:

@ViewChild('grid', { read: IgxGridComponent })
public grid: IgxGridComponent;
 let column = this.grid.columnList.first;
 let cell = column.cells[0];

Hierarchy

Hierarchy

Implements

  • OnInit
  • OnChanges
  • OnDestroy
  • CellType
  • AfterViewInit

Constructors

Properties

activeHighlightClass: string = 'igx-highlight__active'

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';

Memberof

IgxGridCellComponent

cdr: ChangeDetectorRef
cellTemplate: TemplateRef<any>

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;

Memberof

IgxGridCellComponent

cellValidationErrorTemplate: TemplateRef<any>
column: ColumnType

Gets the column of the cell.

 let cellColumn = this.cell.column;

Memberof

IgxGridCellComponent

defaultErrorTemplate: TemplateRef<any>

Gets the default error template.

editMode: boolean = false

Returns whether the cell is in edit mode.

formatter: ((value: any, rowData?: any, columnData?: any) => any)

Type declaration

    • (value: any, rowData?: any, columnData?: any): any
    • Gets the cell formatter.

      let cellForamatter = this.cell.formatter;
      

      Memberof

      IgxGridCellComponent

      Parameters

      • value: any
      • Optional rowData: any
      • Optional columnData: any

      Returns any

grid: GridType
highlightClass: string = 'igx-highlight'

Sets/gets the highlight class of the cell. Default value is "igx-highlight".

let highlightClass = this.cell.highlightClass;
this.cell.highlightClass = 'igx-cell-highlight';

Memberof

IgxGridCellComponent

pinnedIndicator: TemplateRef<any>
role: string = 'gridcell'

Sets/get the role property of the cell. Default value is "gridcell".

this.cell.role = 'grid-cell';
let cellRole = this.cell.role;

Memberof

IgxGridCellComponent

rowData: any

Gets the data of the row of the cell.

let rowData = this.cell.rowData;

Memberof

IgxGridCellComponent

value: any

Sets/gets the cell value.

this.cell.value = "Cell Value";
let cellValue = this.cell.value;

Memberof

IgxGridCellComponent

width: string = ''

Gets the width of the cell.

let cellWidth = this.cell.width;

Memberof

IgxGridCellComponent

Accessors

  • get cellID(): {
        columnID: number;
        rowID: any;
        rowIndex: number;
    }
  • Gets the ID of the cell.

    let cellID = this.cell.cellID;
    

    Memberof

    IgxGridCellComponent

    Returns {
        columnID: number;
        rowID: any;
        rowIndex: number;
    }

    • columnID: number
    • rowID: any
    • rowIndex: number

Methods

  • If the provided string matches the text in the cell, the text gets highlighted.

    this.cell.highlightText('Cell Value', true);
    

    Memberof

    IgxGridCellComponent

    Parameters

    • text: string
    • Optional caseSensitive: boolean
    • Optional exactMatch: boolean

    Returns number