I required to add columns in a table on tree data add. If In tree, I add “Group1” node with “Ch1” & “CH2” children then there should be column entry like Group1 with CH1 and Ch2 as colspans. No.of children may vary so no.of colspans also vary and want to save datatable data with its colspans info.
How can I do it?
The point is in the initial logic, and the fact that groups/channels can be at the same level, it turns out that taking into account everything is difficult,and not everything will work (example: Code Snippet).
If we take as a basis the previous example (when groups are always added at the same level (top), and channels are their children, and they are also on the same level), then this can be done by adding extra logic, namely by using the custom relatedId property to remove related columns.
Here is an example of how this can be done, please take a look: https://snippet.webix.com/vrno1bi0