Greetings,
I'm facing an issue with an Hierarchy DataGrid not showing "subrecords"
I'm can't seem to realize what I'm doing wrong, since I already have the "subrecord" data "ready to display"
<RadzenDataGrid @ref="modulesGrid"
TItem="AuthorizationProfileModel"
AllowFiltering="true"
AllowSorting="true"
Data="@modulesList"
RowRender="@RowRender"
RowClick="OnRowClick"
RowSelect="OnRowSelect"
LoadChildData="LoadChildData"
RowCollapse="@(args => modulesGrid.ColumnsCollection.ToList().ForEach(c => c.ClearFilters()))">
<Columns>
<RadzenDataGridColumn Frozen="true" Sortable="false" Filterable="false" Width="300px">
<Template Context="data">
@data.ModuleName
</Template>
</RadzenDataGridColumn>
</Column>
</RadzenDataGrid>
async void RowRender(RowRenderEventArgs<AuthorizationProfileModel> args)
{
args.Expandable = (await AuthorizationProfilesFactory.GetLoginPermissions(dbAccess, selectedUser, $"{args.Data.Module}_1")).ToList().Any();
//args.Expandable = modulesList.Any() ;
}
async void LoadChildData(DataGridLoadChildDataEventArgs<AuthorizationProfileModel> args)
{
try
{
args.Data = await AuthorizationProfilesFactory.GetLoginPermissions(dbAccess, selectedUser, $"{args.Item.Module}_1");
//await modulesGrid.ExpandRow(args.Item);
}
catch (Exception ex)
{
NotificationService.Notify(new NotificationMessage
{
Severity = NotificationSeverity.Error,
Summary = "Erro: ",
Detail = ex.Message,
Duration = 5000
});
}
}
Best Regards,