Is there a parameter responsible for displaying the current page number? I can't update it, it keeps getting the value 1.
Radzen version 5.1.3
<RadzenDataGrid @ref="shopsGrid" AllowPaging="true" AllowColumnResize="true"
PageSize="@pageSize" PageSizeOptions="@pageSizeOptions" Count="@totalItems"
LoadData="@LoadData" AllowSorting="true" EditMode="DataGridEditMode.Single"
Data="@shops" TItem="ShopDTO" ColumnWidth="200px">
<Columns>
<RadzenDataGridColumn TItem="ShopDTO" Property="Code" Title="Skrócona nazwa" Width="120px">
<Template Context="ShopDTO">
@ShopDTO.Code
</Template>
</RadzenDataGridColumn>
</Columns>
</RadzenDataGrid>
code
IEnumerable<int> pageSizeOptions = new int[] { 5, 10, 20, 30 };
RadzenDataGrid<ShopDTO>? shopsGrid;
IList<ShopDTO>? shops;
private int totalItems;
private int pageSize = 5;
public bool isLoading = true;
private async Task LoadData(LoadDataArgs args)
{
var paginationParams = PaginationHelper<ShopDTO>.CreatePagination(args);
var result = await _shopService.GetAllPagining(paginationParams);
if (result.Succeeded)
{
shops = result!.Value.Items.ToList();
totalItems = result.Value.TotalItems;
pageSize = result.Value.PageSize;
}
}