I'm currently trying to render a grid based off enumerables of the following:
I can get the header row to show but I am unsure of how to get the child objects to iterate into the child rows (Grouped under the "Addition")
So to reiterate, I have a List of LandValGroups, and each one contains lists of LandValRows. What am I missing in how to render this?
public class LandValGroup
{
public List<LandValRow> landValRows = new List<LandValRow>();
public string? Addition { get; set; }
}
public class LandValRow
{
public string? Lot { get; set; }
public string? Block { get; set; }
public string? Comment { get; set; }
}
I've tried using dot notation as I saw in an example but with no luck on a sub object
<RadzenDataGrid Data="@records" AllowGrouping="true" TItem="LandValGroup" AllowFiltering="true" AllowColumnResize="true" FilterMode="FilterMode.Advanced"
AllowSorting="true" PageSize="15" AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" HideGroupedColumn="true"
GridLines="DataGridGridLines.None">
<Columns>
<RadzenDataGridColumn TItem="LandValGroup" Property=Addition Title="Addition" Frozen="false" TextAlign="TextAlign.Left" Sortable="true" Filterable="true" />
<RadzenDataGridColumn TItem="LandValGroup" Property="LandValRow.Lot" Title="Lot" Frozen="false" TextAlign="TextAlign.Left" Sortable="true" Filterable="true" />
<RadzenDataGridColumn TItem="LandValGroup" Property="LandValRow.Block" Title="Block" Frozen="false" TextAlign="TextAlign.Left" Sortable="true" Filterable="false" />
<RadzenDataGridColumn TItem="LandValGroup" Property=Comment Title="Comment" Frozen="false" TextAlign="TextAlign.Left" Sortable="true" Filterable="true" />
</Columns>
</RadzenDataGrid>
</div>
Maybe this should be a hierarchy instead? I'm not sure what the best option is for what I'm doing.