# Class DataGridComponent<T>

#### Type Parameters

- T extends Record<string, any>

#### Implements

- OnInit
- OnDestroy
- AfterContentInit

- Defined in lib/data-grid.component.ts:109

#####
Index

### Constructors

constructor

### Properties

_editMode$
_mode$
_routerEventSubscription
cdr
data?
data$
dataLoading$
dataSource?
displayProperties
editModeChange
formDirective?
hasError$
header
hideEmptyProperties
isDevMode
isEditMode$
isFormMode$
isPlainMode$
loading$
mode$
router
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>(cdr, router, formDirective?): DataGridComponent<T>

- #### Type Parameters

  - T extends Record<string, any>

  #### Parameters

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

  #### Returns DataGridComponent<T>

  - Defined in lib/data-grid.component.ts:153

## Properties

### `Private` _editMode$

_editMode$: BehaviorSubject<boolean> = ...

- Defined in lib/data-grid.component.ts:149

### `Private` _mode$

_mode$: BehaviorSubject<DataGridMode> = ...

- Defined in lib/data-grid.component.ts:150

### `Private` _routerEventSubscription

_routerEventSubscription: Subscription = null

- Defined in lib/data-grid.component.ts:151

### `Private` `Readonly` cdr

cdr: ChangeDetectorRef

- Defined in lib/data-grid.component.ts:154

### `Optional` data

data?: T

- Defined in lib/data-grid.component.ts:125

### data$

data$: Observable<T>

- Defined in lib/data-grid.component.ts:119

### dataLoading$

dataLoading$: Observable<boolean> = ...

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

### `Optional` dataSource

dataSource?: DataSource<T, DataSourceViewer>

- Defined in lib/data-grid.component.ts:117

### displayProperties

displayProperties: string[] = null

- Defined in lib/data-grid.component.ts:128

### editModeChange

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

#### Type declaration

- ##### `Optional` data?: T

- ##### done: (() => void)

  - - (): void

    - #### Returns void

- ##### mode: boolean

- Defined in lib/data-grid.component.ts:136

### `Private` `Optional` `Readonly` formDirective

formDirective?: FormDirective<any>

- Defined in lib/data-grid.component.ts:157

### hasError$

hasError$: Observable<boolean> = ...

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

### header

header: boolean = false

- Defined in lib/data-grid.component.ts:114

### hideEmptyProperties

hideEmptyProperties: boolean = false

- Defined in lib/data-grid.component.ts:131

### isDevMode

isDevMode: boolean = ...

- Defined in lib/data-grid.component.ts:111

### `Readonly` isEditMode$

isEditMode$: Observable<boolean>

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

### `Readonly` isFormMode$

isFormMode$: Observable<boolean>

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

### `Readonly` isPlainMode$

isPlainMode$: Observable<boolean>

- Defined in lib/data-grid.component.ts:148

### loading$

loading$: ToggleSubject = ...

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

### `Readonly` mode$

mode$: Observable<DataGridMode>

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

### `Private` `Readonly` router

router: Router

- Defined in lib/data-grid.component.ts:155

### rows

rows: QueryList<DataGridRowDefDirective<T>>

- Defined in lib/data-grid.component.ts:134

### rows$

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

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

### viewer

viewer: DataSourceViewer = ...

- Defined in lib/data-grid.component.ts:122

## Accessors

### editMode

- set editMode(value): void

- #### Parameters

  - value: boolean

  #### Returns void

  - Defined in lib/data-grid.component.ts:190

### hasAnyEditCells

- get hasAnyEditCells(): boolean

- #### Returns boolean

  - Defined in lib/data-grid.component.ts:182

### isEditMode

- get isEditMode(): boolean

- #### Returns boolean

  - Defined in lib/data-grid.component.ts:186

### isFormMode

- get isFormMode(): boolean

- #### Returns boolean

  - Defined in lib/data-grid.component.ts:178

### isFormModeOrHasAnyEditCells

- get isFormModeOrHasAnyEditCells(): boolean

- #### Returns boolean

  - Defined in lib/data-grid.component.ts:174

### loading

- get loading(): boolean

- #### Returns boolean

  #### Deprecated

  use the loading$ property instead

  - Defined in lib/data-grid.component.ts:197

### mode

- set mode(value): void

- #### Parameters

  - value: string

  #### Returns void

  - Defined in lib/data-grid.component.ts:166

## Methods

### cancel

- cancel(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:375

### disableEditMode

- disableEditMode(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:295

### enableEditMode

- enableEditMode(skipPatchValue?): void

- #### Parameters

  - skipPatchValue: boolean = false

  #### Returns void

  - Defined in lib/data-grid.component.ts:273

### logCurrentFormState

- logCurrentFormState(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:208

### ngAfterContentInit

- ngAfterContentInit(): void

- #### Returns void

  Implementation of AfterContentInit.ngAfterContentInit

  - Defined in lib/data-grid.component.ts:201

### ngOnDestroy

- ngOnDestroy(): void

- #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  - Defined in lib/data-grid.component.ts:268

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in lib/data-grid.component.ts:212

### refresh

- refresh(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:367

### reset

- reset(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:358

### retry

- retry(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:380

### submit

- submit(): void

- #### Returns void

  - Defined in lib/data-grid.component.ts:311