PageSize coming through as zero

0 Answers 63 Views
Grid
Roy
Top achievements
Rank 1
Iron
Roy asked on 17 May 2023, 06:10 PM

I have a grid with the DataSource property specified as: 

 

.DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(10)
        .Events(e=>e.Error("getPoliciesError"))
        .Read(read => read.Action("Applications_Read", "MultiSearch")
        .Data("getPolicyFilter")
        )
    )

Initially, I was not specifying PageSize at all, however, when Applications_Read was called, PageSize was always 10 (which is what I wanted) so I assumed that was the default.  Then we started getting errors where it was coming through as 0.  So I added the PageSize method on the initializer.  Now the error where it comes through as 0 is rare, but still happens occasionally.  

 

Has anyone encountered this?  For now I can fix it by just adding code to the Applications_Read method saying if it comes through as 0, set to 10, however that will be irritating as we add many more grids with different and possibly customizable page sizes. 

Anton Mironov
Telerik team
commented on 22 May 2023, 05:36 AM

Hi Roy,

Thank you for the details provided.

The fastest route to getting you up and running is if you could provide a runnable, isolated, sample project. Examining this project will let us replicate the issue locally and further troubleshoot it.

Looking forward to hearing back from you.


Kind Regards,
Anton Mironov

Roy
Top achievements
Rank 1
Iron
commented on 23 May 2023, 06:02 PM

Hi Anton, understood.  Sounds like this is not a known issue.  If it gets bad again I will try to replicate it in a simpler environment since currently it only happens in production.  

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Roy
Top achievements
Rank 1
Iron
Share this question
or