How to set KendoGrid column fields array with the results of a JS function


I have a JS function “columnFields()” that returns a string array of what I want the column names in a KendoGrid to be. How do I set the column fields to that array?

I am currently trying to do it by creating a custom KendoGrid:

		extend: "C3.view.KendoGrid",
            columns: [{
            fields: [the results of columnFields()]


Is columnFields an API call? If that’s the case, I think you’ll need a DynamicGrid instead of a KendoGrid.

From the DynamicGrid docs:

This component allows users to create a KendoGrid with dynamic column configurations as defined by a data source.