RevGrid - v0.9.3
    Preparing search index...
    interface RevMetaServer {
        getMetadataStore(): RowMetadata[];
        getRowMetadata(rowIndex: number): undefined | null | RowMetadata;
        setMetadataStore(metadataStore?: RowMetadata[]): void;
        setRowMetadata(rowIndex: number, newMetadata?: RowMetadata): void;
    }
    Index

    Methods

    • Get the metadata store. The precise type of this object is implementation-dependent so not defined here. Hypergrid never calls getMetadataStore itself. If implemented, Hypergrid does make a single call to setMetadataStore when data model is reset with no arguments.

      Returns RowMetadata[]

      Metadata store object.

    • IMPLEMENTATION OF THIS METHOD IS OPTIONAL.

      Get the row's metadata object, which is a hash of cell properties objects, for those cells that have property overrides, keyed by column name; plus a row properties object with key __ROW when there are row properties.

      The default implementations of getRowMetadata and setRowMetadata store the metadata in an in-memory table. If this is not appropriate, override these methods to store the meta somewhere else (e.g., with the data in a hidden column, in another database table, in local storage, etc.).

      Parameters

      • rowIndex: number

        Row index.

      Returns undefined | null | RowMetadata

      One of:

      • object - existing metadata object; else
      • undefined - row found but no existing metadata; else
      • null - no such row
    • IMPLEMENTATION OF THIS METHOD IS OPTIONAL.

      Set the metadata store. The precise type of this object is implementation-dependent, so not defined here.

      If implemented, Hypergrid makes a single call to setMetadataStore when data model is reset with no arguments. Therefore this method needs to expect a no-arg overload and handle it appropriately.

      Hypergrid never calls getMetadataStore.

      Parameters

      • OptionalmetadataStore: RowMetadata[]

        New metadata store object. Omitted on data model reset.

      Returns void

    • IMPLEMENTATION OF THIS METHOD IS OPTIONAL.

      Set the row's metadata object, which is a hash of cell properties objects, for those cells that have property overrides, keyed by column name; plus a row properties object with key __ROW when there are row properties.

      The default implementations of getRowMetadata and setRowMetadata store the metadata in an in-memory table. If this is not appropriate, override these methods to store the meta somewhere else (e.g., with the data in a hidden column, in another database table, in local storage, etc.).

      Parameters

      • rowIndex: number

        Row index.

      • OptionalnewMetadata: RowMetadata

        When omitted, delete the row's metadata.

      Returns void