# Radzen Data Grid Export - Columns beginning with numbers

**URL:** <https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056>\
**Category:** Radzen.Blazor Components\
**Created:** [March 31, 2025, 10:05am UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056 "2025-03-31T10:05:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuffy](https://forum.radzen.com/letter_avatar_proxy/v4/letter/t/919ad9/32.png) [@tuffy](https://forum.radzen.com/u/tuffy)\
**Post date:** [March 31, 2025, 10:05am UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056/1 "2025-03-31T10:05:17Z")

</div>

Hi there, I've got columns beginning with a number (e.g. 30\_bananas) in my Radzen Data Grid. I'm using the built in export functionality which creates the select part of the query like this:  
` var select = string.Join(",", grid0.ColumnsCollection.Where(c => c.GetVisible() && !string.IsNullOrEmpty(c.Property)).Select(c => c.Property.Contains(".") ? c.Property + " as " + c.Title.Replace(".", "").Replace(" ", "_") : c.Property + " as " + c.Title.Replace(".", "").Replace(" ", "_")));`

But this causes the export to stop working, as an error occurs in the ApplyQuery function in the ExportController:  
`return items.Select($"new ({query["$select"].ToString()})");`

Any ideas?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 31, 2025, 11:20am UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056/2 "2025-03-31T11:20:19Z")

</div>

> [@Validation on Dynamic DataGrid](https://forum.radzen.com/t/validation-on-dynamic-datagrid/19914/10):
>
> Here is an example: [image] \<RadzenDataGrid @ref=grid @bind-Value=@selectedItems Data="@data" TItem="IDictionary\<string, object\>" ColumnWidth="200px" AllowFiltering="true" FilterPopupRenderMode="PopupRenderMode.OnDemand" FilterMode="FilterMode.Advanced" AllowPaging="true" AllowSorting="true"\> \<Columns\> @foreach (var column in columns) { \<RadzenDataGridColumn @key=@column.Key Title="@column.Key" Type="column.Value" Property="@PropertyAccess.GetDynamic…

---

<div class="post-metadata">

**Author:** ![tuffy](https://forum.radzen.com/letter_avatar_proxy/v4/letter/t/919ad9/32.png) [@tuffy](https://forum.radzen.com/u/tuffy)\
**Post date:** [March 31, 2025, 1:11pm UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056/3 "2025-03-31T13:11:59Z")

</div>

Not sure how that helps? If my column is 30bananas, it will still break when I try to export.

```auto

columns = new Dictionary<string, Type>()
        {
            { "30bananas", typeof(int?) }
}

```

In C#, you can't have variable names that start with a number. Hence this breaks in the export controller:  
`return items.Select($"new ({query["$select"].ToString()})");`

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [March 31, 2025, 1:26pm UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056/4 "2025-03-31T13:26:17Z")

</div>

Yes, this is a case which is not supported out of the box. You should specify an alias (via ‘as’) so your columns are valid C# identifiers. The other option is to modify the export controller.

---

<div class="post-metadata">

**Author:** ![tuffy](https://forum.radzen.com/letter_avatar_proxy/v4/letter/t/919ad9/32.png) [@tuffy](https://forum.radzen.com/u/tuffy)\
**Post date:** [March 31, 2025, 1:44pm UTC](https://forum.radzen.com/t/radzen-data-grid-export-columns-beginning-with-numbers/20056/5 "2025-03-31T13:44:31Z")

</div>

Thanks. I know it's a minor issue, but maybe you could consider this in your next release and modify the export controller so it works. 🙂
