PropertyAccess.GetDynamicPropertyExpression(colName, colType(colName)) returns invalid expression if colName contains a whitespace or a "." #1957

Closed
opened 2026-01-29 18:16:03 +00:00 by claunia · 2 comments
Owner

Originally created by @mmauri on GitHub (Jan 21, 2026).

Describe the bug
if colName contains a whitespace or a ., PreopertyAccess.GetDynamicPropertyExpression return an expression that cannot be mapped to RadzenDataGridColumn.Property:

PropertyAccess.GetDynamicPropertyExpression(colName, colType(colName))

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://blazor.radzen.com/datagrid-datatable
  2. Change function GetDataTable(IEnumerable employees) to create a Datatable with a columnName that contains a "." or a whitespace.
  3. When running an exception is thrown saying that the RadzenDataGridColumn.Property cannot be found.

Expected behavior
No exception thrown

**Desktop

  • OS: Win11
  • Browser Chromium
  • Version 144.0.7559.59

Let me know if the info is enough to fix it please.

Thank you very much for creaqting such a great component library

Originally created by @mmauri on GitHub (Jan 21, 2026). **Describe the bug** if colName contains a whitespace or a ., PreopertyAccess.GetDynamicPropertyExpression return an expression that cannot be mapped to RadzenDataGridColumn.Property: PropertyAccess.GetDynamicPropertyExpression(colName, colType(colName)) **To Reproduce** Steps to reproduce the behavior: 1. Go to https://blazor.radzen.com/datagrid-datatable 2. Change function GetDataTable<T>(IEnumerable<T> employees) to create a Datatable with a columnName that contains a "." or a whitespace. 3. When running an exception is thrown saying that the RadzenDataGridColumn.Property cannot be found. **Expected behavior** No exception thrown **Desktop - OS: Win11 - Browser Chromium - Version 144.0.7559.59 - Let me know if the info is enough to fix it please. Thank you very much for creaqting such a great component library
Author
Owner

@enchev commented on GitHub (Jan 22, 2026):

Dot is used as sub property notation and cannot be supported for property names. Space is already supported and can be seen in this demo:
https://blazor.radzen.com/datagrid-dynamic?theme=material3

Image
@enchev commented on GitHub (Jan 22, 2026): Dot is used as sub property notation and cannot be supported for property names. Space is already supported and can be seen in this demo: https://blazor.radzen.com/datagrid-dynamic?theme=material3 <img width="1920" height="1080" alt="Image" src="https://github.com/user-attachments/assets/2e7af063-de06-4591-8228-9e93850896e7" />
Author
Owner

@mmauri commented on GitHub (Jan 25, 2026):

Understood.
So, the best option is to replace the dots in users datasets

Thanks!

@mmauri commented on GitHub (Jan 25, 2026): Understood. So, the best option is to replace the dots in users datasets Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1957