Dynamic column Issue

Hello team,
Here, I’ve created datatable with dynamic columns from given json data. but datatable is not generated with all given columns.

For more details, please refer this snippet.

https://snippet.webix.com/t386cfi1

Hello @Pooja,

Here, I’ve created datatable with dynamic columns from given json data. but datatable is not generated with all given columns.

The autoConfig property generates columns based on the first item of the provided dataset. Basically, the scenario in which different data items have different columns is not supported by the autoConfig.

As an alternative, you can either:

If your columns are dynamically generated on the server, you can provide the column configuration alongside your dataset within an external config: Code Snippet.

Or, if you wish to keep using the autoConfig property:

  • provide every field name within your data items, even if that field is empty.

All in all, only the first item needs to have every field name that is going to be used to generate the columns. Here is an example: Code Snippet. Realistically, every item within your collection will likely follow the format present in the first item.

Thank u so much @Dzmitry for all given solutions.