"grid addSpan" help

When called for the first time, it works normally.

The col span is not processed from the second time.
help…

[sources]

        gridList.data.removeAll();
        gridList.data.add({id: 0, 'userId' : "data not found"})
        gridList.addSpan({
            row: 0,
            column: 'userId',
            colspan: 10 
            css: 'custom-grid-colspan'
        });

In your provided code the coma is missing after the colspan parameter, but I assume this is not the case.
In general, your provided code works well for me.
Here is the example based on your provided code snippet:
https://snippet.dhtmlx.com/7bvmovzt
If the problem still occurs for you please, provide a complete demo or a similar snippet, where the problem can be reconstructed locally.

It doesn’t “col span” on the second click.

https://snippet.dhtmlx.com/7t6hvulc
Please check the code snippet.

As you are using the fixed ids and they are similar with every data reloading you should remove all your spans added to the data before reloading and reapplying the spans back again.
https://snippet.dhtmlx.com/k1x30avh

1 Like