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

Implements

  • OnInit
  • OnChanges
  • OnDestroy

Constructors

constructor

Properties

activeHighlightClass

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

cdr: ChangeDetectorRef

cellTemplate

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

column

column: ColumnType

Gets the column of the cell.

 let cellColumn = this.cell.column;
@memberof

IgxGridCellComponent

editMode

editMode: boolean = false

Returns whether the cell is in edit mode.

focused

focused: boolean = this.active

formatter

formatter: function

Gets the cell formatter.

let cellForamatter = this.cell.formatter;
@memberof

IgxGridCellComponent

Type declaration

    • (value: any): any
    • Parameters

      • value: any

      Returns any

gridAPI

gridAPI: GridBaseAPIService<IgxGridBaseDirective & GridType>

highlightClass

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

pinnedIndicator: TemplateRef<any>

role

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

row

row: RowType

Gets the row of the cell.

let cellRow = this.cell.row;
@memberof

IgxGridCellComponent

rowData

rowData: any

Gets the data of the row of the cell.

let rowData = this.cell.rowData;
@memberof

IgxGridCellComponent

value

value: any

Sets/gets the cell value.

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

IgxGridCellComponent

width

width: string = ""

Gets the width of the cell.

let cellWidth = this.cell.width;
@memberof

IgxGridCellComponent

Accessors

ariaSelected

  • get ariaSelected(): boolean

attrCellID

  • get attrCellID(): string

booleanClass

  • get booleanClass(): any

cellID

  • get cellID(): object

colEnd

  • get colEnd(): number

colStart

  • get colStart(): number

columnIndex

  • get columnIndex(): number

columnSelected

  • get columnSelected(): boolean

context

  • get context(): any

describedby

  • get describedby(): string

dirty

  • get dirty(): any

editValue

  • get editValue(): any
  • set editValue(value: any): void

editable

  • get editable(): boolean

grid

  • get grid(): any

gridColumnSpan

  • get gridColumnSpan(): number

gridID

  • get gridID(): any

gridRowSpan

  • get gridRowSpan(): number

nativeElement

  • get nativeElement(): HTMLElement

pinnedIndicatorTemplate

  • get pinnedIndicatorTemplate(): TemplateRef<any>

readonly

  • get readonly(): boolean

rowEnd

  • get rowEnd(): number

rowIndex

  • get rowIndex(): number

rowStart

  • get rowStart(): number

selected

  • get selected(): boolean
  • set selected(val: boolean): void

template

  • get template(): TemplateRef<any>

visibleColumnIndex

  • get visibleColumnIndex(): number
  • set visibleColumnIndex(val: number): void

Methods

clearHighlight

  • clearHighlight(): void

highlightText

  • highlightText(text: string, caseSensitive?: boolean, exactMatch?: boolean): number
  • 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

isCellSelected

  • isCellSelected(): boolean

setEditMode

  • setEditMode(value: boolean): void

update

  • update(val: any): void