Posted 26 June 2018, 9:59 am EST
Hi,
If you want the cell to merge only horizontally then you need to set the allowMerging property of rows to true.
Similarly, to merge cells vertically, we need to set the allowMerging property of columns to true.
So if we modify your code snippet and remove allowMerging from column definition and add it to rows then it should work perfectly.
Please refer to following code snippet
invoiceExportGrid = new wijmo.grid.FlexGrid(document.createElement('div'), {
itemsSource: customExportStructure,
autoGenerateColumns: false,
columns: [
{ binding: 'col0.data', header: 'col0', width: 20 },
{ binding: 'col1.data', header: 'col1', width: 210 },
{ binding: 'col2.data', header: 'col2', width: 210 },
{ binding: 'col3.data', header: 'col3', width: 210 }
],
isReadOnly: true,
allowMerging: wijmo.grid.AllowMerging.Cells,
headersVisibility: 0
});
[b]invoiceExportGrid.rows.forEach(row=>{
row.allowMerging=true;
});[/b]
You can also refer to the following sample which implements the same:-
[b]https://stackblitz.com/edit/angular-jcaqna?file=app%2Fapp.component.ts[/b]
P.S. If you are creating grid without the intent to display UI then please consider passing an HTMLDivElement instance(not yet attached to document) to FlexGrid constructor.
~Manish