ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Mikael Andersen on July 02, 2026, 07:11:54 pm

Title: Multi-selection fails with initial selection
Post by: Mikael Andersen on July 02, 2026, 07:11:54 pm
Hi at pqgrid,

We experienced a problem with initial selection being set and the use of "Shift+click" to do multi-cell selection.
Its reproducable in demo following these steps,

* Open demo: https://paramquery.com/pro/demos/grid_parts
* Insert this line after creating grid, f.x. on line 102: grid.setSelection({ rowIndx: 0, colIndx: 0})
* Run (top, leftmost cell is selected as expected)
* Hold shift and click on a different cell to do a block selection

Nothing happens and this error is displayed in console:
Uncaught TypeError: can't access property "r1", n is undefined
    resize https://paramquery.com/pro2/content/js11.2.0/pqgrid.min.js?4:32
    resizeOrReplace https://paramquery.com/pro2/content/js11.2.0/pqgrid.min.js?4:32
    onCellMouseEnter https://paramquery.com/pro2/content/js11.2.0/pqgrid.min.js?4:32
  ...
Title: Re: Multi-selection fails with initial selection
Post by: paramvir on July 03, 2026, 05:25:51 pm
Please use grid.Range() API instead of setSelection.

Code: [Select]
        grid.Range({
            r1: 0,
            c1: 0,
            firstR:0,
            firstC:0
        }).select();

Ref: https://paramquery.com/pro/api#method-Range