We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Layout doesn't resize when tablet changes its orientation

Hello,

We have a grid using practically all the window. If we load the window in portrait and we change to landscape, The grid doesn't resize to use all the window.

What can we do?

Regards

7 Replies

AN Ashok N Syncfusion Team August 28, 2017 10:37 AM UTC

Hi Sandra,      
      
Thanks for contacting Syncfusion support.   
   
We have checked the reported SfDataGrid not resizing based on the orientation issue in Xamarin.Android but we are not able to reproduce the reported this. SfDataGrid resized properly based on the orientation change. For your reference we have attached the working copy of the sample in the below sample location, please refer it. Could you please do revert us by modifying our sample to replicate the issue. Otherwise please share your SfDataGrid definition code snippet, also please share the details if you use any layout for loading SfDataGrid or share your sample along with replication procedure, that would be more helpful for us to proceed further.       
      
     
Regards,      
Ashok  



AN Andrey November 9, 2017 11:33 AM UTC

I have the same problem. I have GridView inside Fragment. When I rotate to landscape not all columns draws (last 3 columns missed). On screenshots you can see that DataGrid is resized correctly but columns not draw. If I tap on datagrid on that moment and scroll a little than culumns appers. I tried evereting. After rotation I called DataGrid.Invalidate(), DataGrid.PostInvalidate(), DataGrid.RequestLayout(), DataGrid.GridColumnSizer.Refresh(). Nothing helps me
Attachment: Screenshots_b40731f7.zip


AN Ashok N Syncfusion Team November 12, 2017 03:34 PM UTC

Hi Andrey,       
       
Thanks for contacting Syncfusion support.    
    
We have prepared SfDataGrid sample by loading inside fragment with 20 GridColumns and tested by changing SfDataGrid orientation in both portrait and landscape in Xamarin.Android but we are not able to reproduce the reported this. SfDataGrid resized properly based on the orientation change. For your reference we have attached our tested video and working copy of the sample in the below sample location, please refer it. Could you please do revert us by modifying our sample to replicate the issue. Otherwise please share your SfDataGrid definition code snippet or share your sample along with replication procedure, that would be more helpful for us to proceed further.        
       
 
      
Regards,       
Ashok   



HM Hector Meneses April 8, 2020 10:49 PM UTC

Hi,
I downloaded your sample and the grid does not even change orientation as I rotate the emulator.
Please advise,

Hector


KK Karthikraja Kalaimani Syncfusion Team April 9, 2020 02:43 PM UTC

Hi Hector,

We have checked the reported issue and it is working fine in android 9.0 emulator. We have attached the tested video for your reference. We suspect that you have not enabled the auto rotate option for the device. So only the grid is not rotating when changing the device orientation.

Video link :  https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video_Reference-261175709.zip

Regards,
Karthik Raja




HM Hector Meneses April 9, 2020 06:44 PM UTC

That was it! Much appreciated. Thanks!


KK Karthikraja Kalaimani Syncfusion Team April 10, 2020 04:47 AM UTC

Hi Hector,

We glad to know that your requirement has resolved at your end. Please let us know if you need further other assistance from us.

Regards,
 
Karthik Raja 


Loader.
Up arrow icon