How do I dynamically add columns to a table

I would like to be able to dynamically create columns for an object-table. Creating 100 or so and hiding those you don’t need seems like a bit of a hack.

Are you trying to dynamically display columns in an object-table based on the data available? For example, you are trying to display the children (has-many relationship) of the parent object that the table is bound to?

If I am understanding your question correctly, there is not a way to programmatically define the number of columns defined within an object-table. You can define a limit and create the columns in the xml and add show-if or hide-if logic as necessary.

Another option could be to display this data in a different way. One suggestion is to include a column to “View more”, which opens a dialog that displays the children objects in a separate object-table so you don’t have to worry about the object count.