NoxGrid Web API
    Preparing search index...

    Interface GridEventMap

    Grid events and their arguments.

    interface GridEventMap {
        beginEdit: { cancel: boolean; col: number; row: number };
        buttonClick: { col: number; row: number };
        cellClick: { col: number; event: MouseEvent; row: number };
        cellDoubleClick: { col: number; event: MouseEvent; row: number };
        cellPasting: {
            cancel: boolean;
            col: number;
            row: number;
            text: string;
            value: CellValue;
        };
        cellValueChanged: {
            col: number;
            nested: boolean;
            newValue: CellValue;
            oldValue: CellValue;
            row: number;
            source: ValueChangeSource;
        };
        columnResized: { col: number; width: number };
        dataError: { col: number; message: string; row: number; text: string };
        endEdit: { cancelled: boolean; col: number; row: number };
        filtered: { col: number };
        footerValue: { col: number; value: CellValue };
        headerCheckChanged: { checked: boolean; col: number };
        headerCheckChanging: { cancel: boolean; checked: boolean; col: number };
        pasted: {
            addedRows: number;
            changed: number;
            col: number;
            colCount: number;
            droppedColumns: number;
            droppedRows: number;
            row: number;
            rowCount: number;
        };
        redo: Record<string, never>;
        selectionChanged: { col: number; row: number };
        sorted: { specs: SortSpec[] };
        undo: Record<string, never>;
    }
    Index
    beginEdit: { cancel: boolean; col: number; row: number }

    Fired before editing starts (set cancel = true to prevent it).

    buttonClick: { col: number; row: number }

    Fired when a button column is clicked.

    cellClick: { col: number; event: MouseEvent; row: number }
    cellDoubleClick: { col: number; event: MouseEvent; row: number }
    cellPasting: {
        cancel: boolean;
        col: number;
        row: number;
        text: string;
        value: CellValue;
    }

    For each cell a paste is about to change (like the desktop CellPasting): text is the pasted text, value the value the grid would put in. Change value to put something else, or set cancel to skip the cell. Not raised for formulas copied inside the grid.

    cellValueChanged: {
        col: number;
        nested: boolean;
        newValue: CellValue;
        oldValue: CellValue;
        row: number;
        source: ValueChangeSource;
    }

    Fired for each cell whose value changes, including undo and redo. source tells why. nested is true when the change was made inside another cellValueChanged handler (e.g. a computed column); its source stays the reason of the first change. Skip such changes with if (e.nested) return;. Undo and redo replay them with the same nested, once per cell.

    columnResized: { col: number; width: number }
    dataError: { col: number; message: string; row: number; text: string }

    Fired when an input value fails formatting or validation.

    endEdit: { cancelled: boolean; col: number; row: number }
    filtered: { col: number }
    footerValue: { col: number; value: CellValue }

    Fired for each column when the footer row is calculated. Change value to show your own value (e.g. a ratio of two sums).

    headerCheckChanged: { checked: boolean; col: number }

    The header check box of a check column was clicked; the shown rows are now all checked (true) or all unchecked (false).

    headerCheckChanging: { cancel: boolean; checked: boolean; col: number }

    The header check box was clicked, before anything changes (like the desktop HeaderCheckChanging). checked is the state the shown rows will get; set cancel to keep them as they are. Order: headerCheckChanging, then cellValueChanged (source 'toggle') for each changed cell, then headerCheckChanged.

    pasted: {
        addedRows: number;
        changed: number;
        col: number;
        colCount: number;
        droppedColumns: number;
        droppedRows: number;
        row: number;
        rowCount: number;
    }

    After a paste (Ctrl+V or pasteText): the pasted area, how many cells changed, rows added by pasteAddsRows, and lines or columns of the text that did not fit and were dropped (droppedRows > 0 means part of the text was not pasted).

    redo: Record<string, never>
    selectionChanged: { col: number; row: number }

    Fired when the current cell or selection changes.

    sorted: { specs: SortSpec[] }
    undo: Record<string, never>