I have a need in my application to create a Blazor wrapper object around a FluentUI Datagrid, as there are a number of common callbacks that will be needed anywhere the datagrid is to be used. My issue is I was hoping I could supply the property/template column as RenderFragment passed into the wrapper, but I cant seem to be able to provide a context object for it to operate on. Im not very familiar with FluentUI's datagrids yet so any help would be appreciated.
A snippet from my wrapper
<div class="@sMainClass" tabindex="-2" @ref="this.oElementReference"> @this.SearchCriteria @this.HeaderControls<FluentDataGrid @ref="this.ucFluentGrid" AutoFit="true" AutoItemsPerPage="@this.bAutoCalculateRowCount" Style="width: 100%;overflow-y:hidden;" ResizableColumns="true" Items="@this.DataService.DataServiceItems.AsQueryable()" Pagination="@this.Pagination" TGridItem="TItem" OnRowClick="@this.FluentRowClick" OnRowDoubleClick="@this.FluentRowDoubleClick"><ChildContent> @GridRow()</ChildContent></FluentDataGrid><FluentPaginator State="@this.Pagination" />Where GridRow is a RenderFragment<TItem>and I was hoping to be able to define it elsewhere as such
<GridRow><PropertyColumn Title="Surname" Property="@(p => p.Surname)" Sortable="true" /><PropertyColumn Title="Forename" Property="@(p => p.Forename)" Sortable="true" /><PropertyColumn Title="Date" Property="@(p => p.DateOfBirth)" Format="MM/dd/yyyy" Sortable="true" /><PropertyColumn Title="Email" Property="@(p => p.Email)" Sortable="true" /></GridRow>