When using Grid/StackLayout/CollectionVIew or any other type of control inside RadScrollView, it is not occupying complete screen width

1 Answer 182 Views
SlideView
Mohammed Rameez
Top achievements
Rank 1
Iron
Mohammed Rameez asked on 31 Jul 2023, 04:51 AM

Hi Telerik.

I need to use Grid inside RadScrollView.

Whereas when trying to use let say, Grid/StackLayout/CollectionView the child content doesn't occupy the complete width of that of the device.

 

NOTE:

1. The RadScrollView occupies the complete width of that of device, only the child content doesn't occupy the complete width.

2. If the RadScrollView is removed the same child content occupies the complete width.

 

Code:

 

Sample Page:

 

Thanks,

Mohammed Rameez Raza.

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 31 Jul 2023, 02:42 PM

Hello Mohammed Rameez Raza,

Thank you for the provided details.

I tested the case and reproduced the behavior. In general, the RadScrollView is not an officially released control. We use it internally in other controls we have like RadDataGrid. 

Note from Microsoft documentation: you should avoid placing scrollable controls in ScrollView. : https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/scrollview 

ScrollView objects should not be nested. In addition, ScrollView objects should not be nested with other controls that provide scrolling, such as CollectionView, ListView, and WebView.

The same is valid for the RadScrollView. However, I have logged this behavior internally, so the team can review it further. 

My suggestion is to use the .NET MAUI ScrollView control.

Let me know if I can assist with anything else. 

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Mohammed Rameez
Top achievements
Rank 1
Iron
commented on 31 Jul 2023, 05:12 PM

Hi Didi,

Thanks for the reply.

this doesn't happens with simple GridView placed inside RadScrollView as well, where as that doesn't have scroll.

 

Thanks,

Mohammed Rameez Raza.

Tags
SlideView
Asked by
Mohammed Rameez
Top achievements
Rank 1
Iron
Answers by
Didi
Telerik team
Share this question
or