Using code provided elsewhere, we are setting Grid.PageSize in OnAfterRenderAsync(bool firstRender) event by determining page viewport size so that Grids auto-size and auto-page to viewable area.
Our code was working fine in SyncFusion.Blazor 19.4.0.50 - all OK.
After updating to today's 19.4.0.52, changing PageSize in this event no longer works. Grid loads with initial default page size, then after value change, paging is corrupted (i.e. cannot even move to 2nd page, and initial page is NOT resized). I have confirmed that the grid is NOT re-requesting the correct Top N data, so it seems it is failing internally somewhere.
We have rolled back to 19.4.0.50, and same code is again working.
|
<SfGrid ID="page6" @ref="Grid" DataSource="@Orders" AllowPaging="true">
<GridEvents DataBound= "Databound" TValue="Order"></GridEvents>
<GridPageSettings PageSize="@PageSize"></GridPageSettings>
<GridColumns>
. . .
</GridColumns>
</SfGrid>
@code{
SfGrid<Order> Grid;
public List<Order> Orders { get; set; }
public bool FirstRender = true;
int PageSize { get; set; } = 8;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
var dimension = await Service.GetDimensions();
var visina = dimension.Height - 170;
PageSize = visina / 37;
FirstRender = false;
Grid.Refresh();
}
}
.. .
} |
Hi, it is not the problem of page size. I think that there is a trouble with data adaptor connection in last update. I have the trouble with showing of almost all grids, with filter selection and so on. Only the first rendering sometimes goes well, and after the first update the grid is broken!
It is often not any data adapter request.
Hi,
For what its worth, today I have updated from 19.4.0.50 (working), to latest 19.4.0.54 and the unchanged pagesize code is WORKING.
i.e. it was NOT WORKING in 19.4.0.52, so I reverted to 19.4.0.50 (working), and whatever was wrong in 19.4.0.52 seems to have been rectified in 0.54.
In my testing of each of these, there were not changes to my pagesize setting code. Only change was nuget versions.
So assuming no further occurrance, from my perspective, this can be closed. I can't comment for Stanislav.
Regards,
Phil