© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
9 replies
J.BE

❔ Bug in blazor?

Hello guys, i have encountered something strange in my blazor app. I'll try to explain it here.
So i have to tables with below a row which shows the totals. These tables almost share the EXACT same code, the only way in they differ is the entities which are used to fill them. (both are records)

As you can see in the image, only the second table shows the totals correctly by summing them up.
List<CategoryLine>? CategoryLines; // first table
List<Totals>? VatRateLines; //second table
List<CategoryLine>? CategoryLines; // first table
List<Totals>? VatRateLines; //second table


The user clicks a button, and this code gets executed, which fills the tables out.
private async Task FillCategories()
    {
        CategoryLines = null; // to trigger spinner
        var result = await JflowerClient.TotalsPerCategoryAsync(DateOnly.FromDateTime(DateFilter.ToDateTime(TimeOnly.MinValue)));
        CategoryLines = result;
    }

    private async Task FillBtwRates()
    {
        VatRateLines = null;
        var result = await JflowerClient.TotalsPerBtwRateAsync(DateOnly.FromDateTime(DateFilter.ToDateTime(TimeOnly.MinValue)));
        VatRateLines = result;
    }
private async Task FillCategories()
    {
        CategoryLines = null; // to trigger spinner
        var result = await JflowerClient.TotalsPerCategoryAsync(DateOnly.FromDateTime(DateFilter.ToDateTime(TimeOnly.MinValue)));
        CategoryLines = result;
    }

    private async Task FillBtwRates()
    {
        VatRateLines = null;
        var result = await JflowerClient.TotalsPerBtwRateAsync(DateOnly.FromDateTime(DateFilter.ToDateTime(TimeOnly.MinValue)));
        VatRateLines = result;
    }
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

File uploading in Blazor
C#CC# / help
4w ago
Singleton timer (in Blazor)
C#CC# / help
2mo ago
blazor
C#CC# / help
3y ago
❔ blazor
C#CC# / help
3y ago