interface GridDataSource {
    getChildrenCount?: ((row: GridValidRowModel) => number);
    getGroupKey?: ((row: GridValidRowModel) => string);
    getRows(params: GridGetRowsParams): Promise<GridGetRowsResponse>;
    updateRow?(updatedRow: GridValidRowModel): Promise<any>;
}

Properties

getChildrenCount?: ((row: GridValidRowModel) => number)

Used to determine the number of children a row has on server.

Type declaration

    • (row): number
    • Parameters

      Returns number

      The number of children the row has. If the children count is not available for some reason, but there are some children, getChildrenCount should return -1.

getGroupKey?: ((row: GridValidRowModel) => string)

Used to group rows by their parent group. Replaces getTreeDataPath used in client side tree-data.

Type declaration

    • (row): string
    • Parameters

      Returns string

      The group key for the row.

Methods

  • This method will be called when the grid needs to fetch some rows.

    Parameters

    Returns Promise<GridGetRowsResponse>

    A promise that resolves to the data of type [GridGetRowsResponse].

  • This method will be called when the user updates a row [Not yet implemented].

    Parameters

    Returns Promise<any>

    If resolved (synced on the backend), the grid will update the row and mutate the cache.