<GridColumns>
@if (Columns == null || Columns.Count == 0)
{
<GridColumn Resizable="true" Title="Data" FieldType="typeof(string)" />
}
else
{
@foreach (var column in Columns)
{
if (column.PreferredType != null)
{
<GridColumn Resizable="true" Field="@column.FieldName" Title="@column.Title" FieldType="column.PreferredType" />
}
else
{
<GridColumn Resizable="true" Field="@column.FieldName" Title="@column.Title" />
}
}
}
</GridColumns>