DataGridControl Dynamic Column Generation using MVVM

DataGridControl Dynamic Column Generation using MVVM

I have a requirement to generate columns dynamically using MVVM pattern. Another requirement is to show parent child relationship. I looked at the example – TreeGridflowView – but the hierarchy should be generated dynamically as well as the depth of the hierarchy will depend on data fetched from database. Is it possible to create an example showing both these requirements?