ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Jignesh on January 09, 2020, 12:29:59 pm

Title: New Row add after selected (Focus) cell/row
Post by: Jignesh on January 09, 2020, 12:29:59 pm
Hi Paramvir,

How to add new row after selected cell/row of grid.

Currently, It added end of grid. Below is my code:

var rowData = {}; //empty row
var rowIndx = grid.addRow({ rowData: rowData });


Thank you,
Jignesh
Title: Re: New Row add after selected (Focus) cell/row
Post by: paramvir on January 09, 2020, 09:59:00 pm
Pass rowIndx parameter to addRow method.

In case of cell selections, selected rowIndx can be obtained from Selection() API

Code: [Select]
var ri = grid.Selection().address()[0].r1;
grid.addRow({
          rowIndx: ri + 1,
          newRow: rowData
})

In case of row selections, rowIndx can be obtained from SelectRow() API