Yes, you need to generate the entire columns property dynamically. This is usually easiest if the source data is in dataset format (so column names are available, in order, and data types are available) in a custom property. You might find this comment helpful:
In addition to showing off the performance of the new features of my free module, it has a skeleton of the kind of scripting you need.