ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: vivianteoh on May 12, 2017, 07:49:18 am

Title: Adding the merge row?
Post by: vivianteoh on May 12, 2017, 07:49:18 am
Hi,

Is there any way to add a new row with merge column in the grid? Attached with the sample picture. Below shown the sample code used.

var rows = manpowerGrid.getRowsByClass({ cls: 'pq-row-edit' });
var rowData = { job: '', grade: '', tagToBU: '', rowTitle: ''  };
var rowIndx = manpowerGrid.addRow({ rowIndxPage: 4, rowData: rowData, checkEditable: false });

Thank you.
Title: Re: Adding the merge row?
Post by: paramvir on May 12, 2017, 09:26:16 am
What about the first 3 rows? There are merged cells in first 3 rows, one merged cell in each row with cc ( colspan ): 4

--------------

Highlighted row in your screenshot is not a single row but comprises of 4 rows with rowIndxPage: 4, 5, 6, 7

and 3 merged cells one for each rc (rowspan).

{r1: 4, c1:0, rc: 4, cc:1},
{r1: 4, c1:1, rc: 4, cc:1},
{r1: 4, c1:2, rc: 4, cc:1}

merge cells are added through mergeCells option: https://paramquery.com/pro/api#option-mergeCells