Articles in this section
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   

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied