API REFERENCE

GridRowRef

Fields, allowed values, and APIs that use GridRowRef.

Type definition

A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.

typescript
export interface GridRowRef<
  TData = GridData,
  TContext = unknown,
> extends GridLiveRef<TData> {
  readonly id: GridRowId;
  getSourceIndex(): number | null;
  getDisplayIndex(): number | null;
  getData(): Readonly<TData> | null;
  getParent(): GridRowRef<TData, TContext> | null;
  getChildren(): ReadonlyArray<GridRowRef<TData, TContext>>;
  isGroup(): boolean;
  isLeaf(): boolean;
  isMaster(): boolean;
  isDetail(): boolean;
  getLevel(): number;
  getRoute(): readonly string[];
  isSelected(): boolean;
  isExpanded(): boolean;
  setSelected(selected: boolean): Promise<boolean>;
  setExpanded(expanded: boolean): Promise<boolean>;
  setData(data: TData): Promise<boolean>;
  updateData(patch: Partial<TData>): Promise<boolean>;
  setValue<TField extends GridFieldPath<TData>>(
    field: TField,
    value: GridPathValue<TData, TField>,
  ): Promise<boolean>;
  setHeight(height: number | null): Promise<boolean>;
  focus(field?: GridFieldPath<TData>): Promise<boolean>;
  startEditing(field: GridFieldPath<TData>): Promise<boolean>;
}

APIs using this type

Contracts containing this type