# Class DataGridComponent<T>

#### Type Parameters

- T extends Record<string, any>

#### Implements

- OnInit
- OnDestroy
- AfterContentInit

- Defined in data-grid.component.ts:108

#####
Index

### Constructors

constructor

### Properties

data?
data$
dataLoading$
dataSource?
displayProperties
editModeChange
hasError$
header
hideEmptyProperties
isDevMode
isEditMode$
isFormMode$
isPlainMode$
loading$
mode$
rows
rows$
viewer

### Accessors

editMode
hasAnyEditCells
isEditMode
isFormMode
isFormModeOrHasAnyEditCells
loading
mode

### Methods

cancel
disableEditMode
enableEditMode
logCurrentFormState
ngAfterContentInit
ngOnDestroy
ngOnInit
refresh
reset
retry
submit

##
Constructors

### constructor

- new DataGridComponent<T extends Record<string, any>>(
  cdr: ChangeDetectorRef,
  router: Router,
  formDirective?: FormDirective<any>,
  ): DataGridComponent<T>

  #### Type Parameters

  - T extends Record<string, any>

  #### Parameters

  - cdr: ChangeDetectorRef
  - router: Router
  - `Optional` formDirective: FormDirective<any>

  #### Returns DataGridComponent<T>

  - Defined in data-grid.component.ts:152

##
Properties

### `Optional` data

data?: T

- Defined in data-grid.component.ts:124

### data$

data$: Observable<T>

- Defined in data-grid.component.ts:118

### dataLoading$

dataLoading$: Observable<boolean> = ...

- Defined in data-grid.component.ts:142

### `Optional` dataSource

dataSource?: DataSource<T, DataSourceViewer>

- Defined in data-grid.component.ts:116

### displayProperties

displayProperties: null | string[] = null

- Defined in data-grid.component.ts:127

### editModeChange

editModeChange: EventEmitter<{ data?: T; done: () => void; mode: boolean }> = ...

- Defined in data-grid.component.ts:135

### hasError$

hasError$: Observable<boolean> = ...

- Defined in data-grid.component.ts:141

### header

header: boolean = false

- Defined in data-grid.component.ts:113

### hideEmptyProperties

hideEmptyProperties: boolean = false

- Defined in data-grid.component.ts:130

### isDevMode

isDevMode: boolean = ...

- Defined in data-grid.component.ts:110

### `Readonly` isEditMode$

isEditMode$: Observable<boolean>

- Defined in data-grid.component.ts:144

### `Readonly` isFormMode$

isFormMode$: Observable<boolean>

- Defined in data-grid.component.ts:146

### `Readonly` isPlainMode$

isPlainMode$: Observable<boolean>

- Defined in data-grid.component.ts:147

### loading$

loading$: ToggleSubject = ...

- Defined in data-grid.component.ts:143

### `Readonly` mode$

mode$: Observable<DataGridMode>

- Defined in data-grid.component.ts:145

### rows

rows: QueryList<DataGridRowDefDirective<T>>

- Defined in data-grid.component.ts:133

### rows$

rows$: Observable<QueryList<DataGridRowDefDirective<T>>> = EMPTY

- Defined in data-grid.component.ts:140

### viewer

viewer: DataSourceViewer = ...

- Defined in data-grid.component.ts:121

##
Accessors

### editMode

- set editMode(value: boolean): void

  #### Parameters

  - value: boolean

  #### Returns void

  - Defined in data-grid.component.ts:189

### hasAnyEditCells

- get hasAnyEditCells(): boolean

  #### Returns boolean

  - Defined in data-grid.component.ts:181

### isEditMode

- get isEditMode(): boolean

  #### Returns boolean

  - Defined in data-grid.component.ts:185

### isFormMode

- get isFormMode(): boolean

  #### Returns boolean

  - Defined in data-grid.component.ts:177

### isFormModeOrHasAnyEditCells

- get isFormModeOrHasAnyEditCells(): boolean

  #### Returns boolean

  - Defined in data-grid.component.ts:173

### loading

- get loading(): boolean

  #### Returns boolean

  #### Deprecated

  use the loading$ property instead

  - Defined in data-grid.component.ts:196

### mode

- set mode(value: string): void

  #### Parameters

  - value: string

  #### Returns void

  - Defined in data-grid.component.ts:165

##
Methods

### cancel

- cancel(): void

  #### Returns void

  - Defined in data-grid.component.ts:374

### disableEditMode

- disableEditMode(): void

  #### Returns void

  - Defined in data-grid.component.ts:294

### enableEditMode

- enableEditMode(skipPatchValue?: boolean): void

  #### Parameters

  - skipPatchValue: boolean = false

  #### Returns void

  - Defined in data-grid.component.ts:272

### logCurrentFormState

- logCurrentFormState(): void

  #### Returns void

  - Defined in data-grid.component.ts:207

### ngAfterContentInit

- ngAfterContentInit(): void

  A callback method that is invoked immediately after Angular has completed initialization of all of the directive's content. It is invoked only once when the directive is instantiated.

  #### Returns void

  Implementation of AfterContentInit.ngAfterContentInit

  - Defined in data-grid.component.ts:200

### ngOnDestroy

- ngOnDestroy(): void

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  - Defined in data-grid.component.ts:267

### ngOnInit

- ngOnInit(): void

  A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

  #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in data-grid.component.ts:211

### refresh

- refresh(): void

  #### Returns void

  - Defined in data-grid.component.ts:366

### reset

- reset(): void

  #### Returns void

  - Defined in data-grid.component.ts:357

### retry

- retry(): void

  #### Returns void

  - Defined in data-grid.component.ts:379

### submit

- submit(): void

  #### Returns void

  - Defined in data-grid.component.ts:310