How can a component inherit from “FluentUI Blazor DataGrid”? I get the following error when I try to inherit from “FluentUI Blazor DataGrid”, anyone have experience with this?
Error:
“CS0411” “The type arguments for method ‘TypeInference.CreatePropertyColumn_7<TGridItem, TProp>(RenderTreeBuilder, int, int, Expression<Func<TGridItem, TProp>>, int, bool?, int, Align)’ cannot be inferred from the usage. Try specifying the type arguments explicitly. “
InheritGrid.razor
@typeparam TItem
@inherits FluentDataGrid<TItem>
@{
base.BuildRenderTree(__builder);
}
InheritGrid.razor.cs
namespace TishtarUI.Test
{
public partial class InheritGrid<TItem> : FluentDataGrid<TItem>
{
}
}
Home.razor
<InheritGrid Items="@Persons" TGridItem="Person">
<PropertyColumn Property="@(p => p.FirstName)" Sortable="true" Align="Align.Start" />
</InheritGrid>