Unexpected initial behavior of DropdownDataGrid.PageSize

Hi, all.

I want to change DropdownDataGrid.PageSize to more large size than the default but it is not possible to do it.

Although the PageSize property of DropdownDataGrid is set to a value other than 5,
the first time it is displayed, it will appear as a setting of 5 items.

Does anyone know how to fix this problem?

How to reproduce the issue.

  1. Set RadzenDropDownDataGrid PageSize="10"

  2. Run the Blazor program and click RadzenDropDownDataGrid

  3. Only 5 items are displayed

Note:
It works fine after changing the page and return again to page 1.

@page "/"
@page "/main-page"
@layout MainLayout
@inherits DropdownDataGridTest.Pages.MainPageComponent

@using Radzen
@using Radzen.Blazor
<RadzenContent Container="main">
  <ChildContent>
    <RadzenHeading Size="H1" Text="MainPage">
    </RadzenHeading>
    <RadzenDropDownDataGrid Data="@Products" PageSize="10" style="width: 558px" Name="DropdownDatagrid0" TValue="dynamic">
      <Columns>
        <RadzenDropDownDataGridColumn Property="Id" Title="Id">
        </RadzenDropDownDataGridColumn>
        <RadzenDropDownDataGridColumn Property="Name" Title="Name">
        </RadzenDropDownDataGridColumn>
        <RadzenDropDownDataGridColumn Property="Price" Title="Price">
        </RadzenDropDownDataGridColumn>
      </Columns>
    </RadzenDropDownDataGrid>
  </ChildContent>
</RadzenContent>
using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Radzen;
using Radzen.Blazor;

namespace DropdownDataGridTest.Pages
{
	public class Product {
		public int Id { get; set; }
		public string Name { get; set; }
		public double Price { get; set; }
	}

    public partial class MainPageComponent
    {
		public IEnumerable<Product> Products { get; set; }

		protected override void OnInitialized()
		{
			Products = new List<Product>()
			{
				new Product() { Id = 1, Name = "AAAA", Price = 1000 },
				new Product() { Id = 2, Name = "BBBB", Price = 2000 },
				new Product() { Id = 3, Name = "CCCC", Price = 3000 },
				new Product() { Id = 4, Name = "DDDD", Price = 4000 },
				new Product() { Id = 5, Name = "EEEE", Price = 5000 },
				new Product() { Id = 6, Name = "FFFF", Price = 6000 },
				new Product() { Id = 7, Name = "GGGG", Price = 7000 },
				new Product() { Id = 8, Name = "HHHH", Price = 8000 },
				new Product() { Id = 9, Name = "IIII", Price = 9000 },
				new Product() { Id = 10, Name = "JJJJ", Price = 10000 },
				new Product() { Id = 11, Name = "KKKK", Price = 11000 },
				new Product() { Id = 12, Name = "LLLL", Price = 12000 },
				new Product() { Id = 13, Name = "MMMM", Price = 13000 },
				new Product() { Id = 14, Name = "NNNN", Price = 14000 },
				new Product() { Id = 15, Name = "OOOO", Price = 15000 }
			};
			base.OnInitialized();
		}
    }
}

Best regards,
Yukishige.

Hi @Yukishige ,

Just tried this in our demo and the component worked properly:

Check if you are using latest version of Radzen.Blazor.

Hi @enchev
Thank you for your reply.

I checked again but the situation is same as creating new project with Radzen ver.2.61.7.

RadzenDropdownDataGridIssue

This is my simple blazor-server project created by Radzen.
(Only MainPage.razor, razor.cs are included)

MainPage.zip (1.5 KB)
meta.zip (2.0 KB)

Thanks @Yukishige! I was able to reproduce the problem and we will do our best to include fix for this in the next update.

@enchev
Thank you very much.

It seems that you already fixed it on Github site of Radzen components repository, but I could not build it.

Is there other way to confirm RadzenDropdownDataGrid before the release ?

It’s already released!

Hi enchev, this still seems to be an issue as we have this exact bug in our application. Did you find a solution for it?

Hi @RIProG ,

I am writing this information in the hope that it will be useful to you.

The problem I faced was solved by updating the Radzen component to the new one at that time.
I also checked the source of the component in the github repo and confirmed that the process of calculating the number of pages has been fixed.

As of now, this problem is no longer occurring in my environment.
This is because I am using the latest version (2.65.13), with creating a new project.

However, I remember that by updating the Radzen IDE, it still had the problem.
To solve this problem, I had to specify the latest version of the Radzen component using NUGET.

1 Like

Thanks for your answer Yukishige, I will check this out!