colspan - combining 2 columns and then removing the colspan

If I combine 2 cells using setColSpan - this.mygrid.setColspan(row_id,1,2);

and then separate them again - this.mygrid.setColspan(row_id,1,1);

the rightmost cell never re-appears correctly - and any formatting of the row will ignore the unmerged (right) cell.
Also - next time I try to combine the cells, they don’t merge.

Repro steps

  1. create a 3 x 3 grid
  2. enable colspan this.mygrid.enableColSpan(true);
  3. add a merge button to merge 2 cells this.mygrid.setColspan(row_id,1,2);
  4. add an unmerge button to unmerge these same 2 cells this.mygrid.setColspan(row_id,1,1);
  5. activate the merge button
  6. activate the unmerge button
  7. activate the merge button again

Actual result
the last colspan does not span across columns 1 and 2 as expected, and cell ‘row_id, 2’

the rightmost cell never re-appears correctly - and any formatting of the row will ignore the unmerged (right) cell.
This is known limitation of colspan functionality. Previous value of right most cell cannot be returned back after unmerging cells.
As a work around you an save value of the rightmost cell and set it back after unmerging cells with setValue() method. Or you can reload grid with previous data.

Also - next time I try to combine the cells, they don’t merge.
We tested this scenario with “ed” left column and “ro” right column and it worked as expected.
Please check if you are using latest version of dhtlxGrid.
If issue still occurs please provide us example of grid initialization and screenshot.