Category / Section
How to have different page size in SfDataPager with SfDataGrid when the device is in horizontal and vertical orientation mode?
1 min read
SfDataGrid allows you to have different page size when device is in horizontal and vertical orientation mode by overriding the OnSizeAllocated method where we can specify the size of the data pager.
The below code example illustrates how to have different page size, when the device is in horizontal and vertical orientation.
protected override void OnSizeAllocated(double width, double height) { if (width > height) dataPager.PageSize = 5; else dataPager.PageSize = 10; base.OnSizeAllocated(width, height); }
Please find the sample from the below link.
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Paging781370774