Steps to reproduce:
- Insert a simple TelerikGrid on your page
- Add Columns with templates for each property
- Specify a Column Template
See https://blazorrepl.telerik.com/GyPvFMFr00zLEEdG00
Problem / Inconvenience
- Context has to be converted/cast before access to the each property is possible
- Grid columns are not generic which makes them hard to use sometimes
- Fields have to be specified by name (may lead to wrong names after changing)
Solution / Feature Request
- Provide new generic columns (to ensure no current implementations break)
- Add [CascadingTypeParameter(nameof(TItem))] to the TelerikGrid
- GridColumns automatically "inherit" the typeparam TItem
Idea from: Blazor QuickGrid
Benefits
- GridColumns can be specified with Expression
- Template context does not have to be cast anymore
- Renaming properties affect expression or an error is display (property does not exist)
<GridColumn For="@(t => t.Name)">
<Template>
<div>
@item.Name
</div>
</Template>
</GridColumn>