How to bind a dynamic variable?

Below is a snippet of the code where a foreach loop creates the different columns. Every loop is basically a field in the row. How can I dynamically set these columns like row.col in @bind-value?

      @foreach (var col in Columns)
                <RadzenDataGridColumn TItem="object" Property="@col" Title="@col" Width="100%">
                    <Template Context="row">
                    <EditTemplate Context="row">
                        <RadzenDatePicker @bind-Value="row" Style="width:100%" />


Hi @tomk,

What does "dynamically set these columns" mean? What is col?

You may find the dynamic data example useful.

Thank you that is a good example!