There is an issue with setting the Grid's Page property to values other than 1.
This is visible on the Blazor Demo for Grid Paging (https://demos.telerik.com/blazor-ui/grid/paging).
Initially the CurrentPage variable is set to 3, and thus the Page property on the Grid is set to 3. The Pager in the grid correctly shows Page 3 and the Pager Info is also correct, however, the data in the Grid is not filtered to the correct page. This can be seen by clicking Page 1 in the Pager (the data remains the same), and then clicking Page 3 in the Pager (the data changes, and is different than the initial data).
Hello Kevin,
Thank you for noticing and reporting this. I have logged it with high priority because it seems to be a regression.
Here's a workaround I can offer - setting the desired page index in the OnAfterRenderAsync event:
<TelerikGrid Data="@MyData" Pageable="true" PageSize="15" @bind-Page="@CurrentPage" Height="500px">
<GridColumns>
<GridColumn Field="ID"></GridColumn>
<GridColumn Field="TheName" Title="Employee Name"></GridColumn>
</GridColumns>
</TelerikGrid>
@code {
int CurrentPage { get; set; }
public IEnumerable<object> MyData = Enumerable.Range(1, 50).Select(x => new { ID = x, TheName = "name " + x });
protected override Task OnAfterRenderAsync(bool firstRender)
{
CurrentPage = 3;
StateHasChanged();
return base.OnAfterRenderAsync(firstRender);
}
}
Regards,
Marin Bratanov
Progress Telerik