[DataGrid] PageSizeOptions bug #281

Open
opened 2026-01-29 17:34:42 +00:00 by claunia · 0 comments
Owner

Originally created by @s-dezign on GitHub (Dec 23, 2021).

I'm using grid with LoadData method.
When providing PageSizeOptions for example as [30, 50, 100] it showing 10 by default anyway. But changing page size works ok.

If I'm providing PageSize as well to select 30 by default, then initial load works fine, but page selection doesn't work and throwing error:

[18:05:48 ERR] An exception occurred while iterating over the results of a query for context type 'ProjectName.Data.ApplicationDbContext'.
System.InvalidOperationException: A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext. For more information on how to avoid threading issues with DbContext

To Reproduce
Steps to reproduce the behavior:

    LoadData="@LoadData"
    PageSizeOptions="@PageSizeOptions"
    PageSize="30"
    
    IEnumerable<int> PageSizeOptions = new int[] { 30, 50, 100 };

Thanks.

Originally created by @s-dezign on GitHub (Dec 23, 2021). I'm using grid with LoadData method. When providing `PageSizeOptions` for example as `[30, 50, 100]` it showing 10 by default anyway. But changing page size works ok. If I'm providing `PageSize` as well to select 30 by default, then initial load works fine, but page selection doesn't work and throwing error: ``` [18:05:48 ERR] An exception occurred while iterating over the results of a query for context type 'ProjectName.Data.ApplicationDbContext'. System.InvalidOperationException: A second operation was started on this context before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext. For more information on how to avoid threading issues with DbContext ``` **To Reproduce** Steps to reproduce the behavior: ``` LoadData="@LoadData" PageSizeOptions="@PageSizeOptions" PageSize="30" IEnumerable<int> PageSizeOptions = new int[] { 30, 50, 100 }; ``` Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#281