SfListview with GridLayout in ScrollView issue

Hello,

I would like to use SfListView with GridLayout in ScrollView. But if I set up properties as below

I see blank space under last row. It seems like SFListview calculates height for "Vertical" layout.


I want to implement "Automatic height calculation" mechanism in this case. i have implemented something like this :


But this code works only with "Task.Delay". If I remove this line it stops to work. I havent found better solution so I would like to ask is there a better approach to solving this problem?


1 Reply

LN Lakshmi Natarajan Syncfusion Team March 9, 2022 12:46 PM UTC

Hi Lucas, 
 
By default, the ListView will layout for the maximum space available based on the screen size. You can achieve your requirement by setting the SfListView.IsScrollingEnabled to False. 
 
Please refer to our user guidance document regarding working with nested ListView, 
 
We have prepared a sample and attached in the following link, 
 
Note: Adding the scrollable control inside the ScrollView is not recommended in Xamarin forms. The Xamarin.Forms warns the usage of nested ScrollView. You can refer to the following documentation regarding the same from the following links,  
 
Please let us know if you need further assistance. 
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon