Author Topic: Adding the merge row?  (Read 2167 times)

vivianteoh

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Adding the merge row?
« 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.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Adding the merge row?
« Reply #1 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
« Last Edit: May 12, 2017, 11:11:09 am by paramquery »