PowerKeys Scripting API
    Preparing search index...

    Interface DataGridWrapper

    A tabular UI element with rows represented by non-null, non-array objects. Valid row data is automatically persisted on every change and restored on next run; stale saved data with the wrong shape falls back to an empty array.

    interface DataGridWrapper {
        GetValue: () => Record<string, unknown>[];
        SetValue: (rows: Record<string, unknown>[]) => void;
        OnRowAction: (
            callback: EventCallback<
                [
                    rowIndex: number,
                    columnKey: string,
                    rowData: Record<string, unknown>,
                ],
            >,
        ) => void;
        Hide: () => void;
        Show: () => void;
        Destroy: () => void;
        SetText: (text: string) => void;
        SetStyle: (style: UIStyle) => void;
    }

    Hierarchy (View Summary)

    Index
    GetValue: () => Record<string, unknown>[]

    Returns all current rows as an array of plain objects keyed by column key.

    SetValue: (rows: Record<string, unknown>[]) => void

    Validates that every row is a non-null, non-array object, replaces all rows, and persists immediately. Invalid input throws without changing storage.

    OnRowAction: (
        callback: EventCallback<
            [rowIndex: number, columnKey: string, rowData: Record<string, unknown>],
        >,
    ) => void

    Fires after a button cell is clicked or a checkbox cell is changed. For checkbox changes, rowData already contains the new boolean value. Read-only text cells do not fire this callback.

    Hide: () => void

    Hides the element without destroying it. Call Show() to make it visible again.

    Show: () => void

    Makes a previously hidden element visible again.

    Destroy: () => void

    Permanently removes the element from the UI panel.

    SetText: (text: string) => void

    Updates the element's display text when the element has a label.

    SetStyle: (style: UIStyle) => void

    Merges supported renderer style properties into the element; unsupported keys are ignored.