SDK10 Blazor: StiReportPage not refreshing/loading inside MudDialog when toggled

5 days ago 9
ARTICLE AD BOX

I am working with SDK10 and implementing a StiReportPage (Stimulsoft) inside a MudDialog. I have a toggle (MudCheckBox) that switches between a standard DataGridReportPage and a detailed StiReportPage.

The Issue: When I toggle the checkbox to show the detailed history, the StiReportPage [insert specific symptom: e.g., remains blank / throws a JavaScript error / does not update with the new Request parameters]. I have tried using @key to force a re-render of the components, but it doesn't seem to solve the problem.

<MudDialog> <DialogContent> <MudCheckBox T="bool" Value="@_showDetailedHistory" ValueChanged="@((bool val) => OnToggleHistory(val))" Label="Display change history detail (slower)" /> @if (_showDetailedHistory) { <StiReportPage @key="@("ticked")" Request="ReportRequestTrail" NoForm="true" /> } else { <DataGridReportPage @key="@("unticked")" Request="ReportRequest" NoForm="true" /> } </DialogContent> <DialogActions> <MudButton OnClick="@Close">Close</MudButton> </DialogActions> </MudDialog> @code { [CascadingParameter] IMudDialogInstance MudDialog { get; set; } = null!; private bool _showDetailedHistory; [Parameter] public Counterpart? Counterpart { get; set; } private async Task OnToggleHistory(bool val) { _showDetailedHistory = val; await InvokeAsync(StateHasChanged); } private CounterpartAuditTrailRequest ReportRequest => new() { Counterpart = new CounterpartOption { Id = Counterpart?.Id ?? 0 } }; private ChangeHistoryDetailReportRequest ReportRequestTrail => new() { Table = new AuditTrailTablesOption { Id = "counterpart" } }; }
Read Entire Article