Dynamic Columns

This sample shows how you can use Vue's v-for directive to create dynamic columns in a FlexGrid control.

The sample presents a UI used to create and edit a collection of strings. The collection is used in a v-for directive to generate the grid columns. The markup is simple:

<wj-flex-grid control="theGrid" :items-source="data" :dragged-column="draggedColumn">
    <wj-flex-grid-column v-for="col in columnsArray" :binding="col" :key="col">
    </wj-flex-grid-column>
</wj-flex-grid>

Notice how the grid columns are automatically updated as you edit the source collection.

Edit the columns here

See the result here