RevGrid - v0.9.3
    Preparing search index...

    Provides access to a field

    interface RevRecordField {
        index: number;
        name: string;
        valueDependsOnRecordIndex?: boolean;
        valueDependsOnRowIndex?: boolean;
        compare(left: RevRecord, right: RevRecord): number;
        compareDesc(left: RevRecord, right: RevRecord): number;
        getEditValue(record: RevRecord): unknown;
        getViewValue(record: RevRecord): unknown;
        setEditValue(record: RevRecord, value: unknown): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    index: number

    Used by servers to index data. Will be used by client to access data in circumstances when a complete row of data is retrieved with RevDataServer.getViewRow from the server.

    name: string

    Identifies a field in the schema. Will be unique within a schema (ie grid).

    valueDependsOnRecordIndex?: boolean

    Set to true if field value depends on Record Index

    valueDependsOnRowIndex?: boolean

    Set to true if field value depends on Row Index

    Methods

    • Compares two records based on this field for sorting in ascending order

      Parameters

      • left: RevRecord

        The record on the left of the comparison

      • right: RevRecord

        The record on the right of the comparison

      Returns number

    • Compares two records based on this field for sorting in descending order

      Parameters

      • left: RevRecord

        The record on the left of the comparison

      • right: RevRecord

        The record on the right of the comparison Can be undefined to disable sorting based on this field

      Returns number

    • Retrieves the value of a field for edit purposes

      Parameters

      Returns unknown

    • Retrieves the value of a field for display purposes

      Parameters

      Returns unknown

    • Set the value of a field

      Parameters

      Returns void