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.
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