How to display two listviews in the same page?

Hello,

i need to display two listviews (and other content) in the same page. They bind to two different objects.
I tried a few different ways and all i get is that the are of the page is split in half, and each listview has its own scollbar.

What i would like instead, is to have the first listview to expand vertically and push down the second list view. And there should be only one scrollbar at page level.
So basically it should be just one long page with 2 listviews stacked on each other.
I also put them inside a vertical scrollview, but it still splits the page in half.

See my attachment:
  • Left: is what I have
  • Right: is what i am trying to do

Attachment: example_fb7612a5.zip

5 Replies

RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 19, 2018 01:18 PM UTC

Hi Cristian, 
 
Sorry for the inconvenience. 
 
We have checked the reported query “Need to display two listviews in the same page” from our side. We would like to let you know that you can load two SfListView’s inside Grid’s RowDefinition Height set as ‘*’ and have its base parent as ScrollView. We strongly recommend you to avoid using this scenario as the SfListView implements its own scrolling and its gestures were handled by the parent ScrollView. For your assistance, we have attached the sample with custom assemblies in the link below. 
 
 
 
We have already included regarding the usage of SfListView with better performance in our documentation and you can refer the same from the below link. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Rawoof M. 



CM Cristian Merli March 20, 2018 03:32 AM UTC

Thanks I will review your example and get back to you if needed.


RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 21, 2018 04:37 AM UTC

Hi Cristian, 
 
Thanks for the update, we will wait until further response from you. 
 
Regards, 
Rawoof M 



CM Cristian Merli March 27, 2018 10:56 PM UTC

Hi, I just have a question.

I see that in most of your example you use grid layouts as opposed to stack layouts.
Is it just your preference or is there a specific reason?


RS Rawoof Sharief Muthuja Sherif Syncfusion Team March 28, 2018 06:32 AM UTC

Hi Cristian, 

We have check the reported query from our end. We would like to let you know that when the SfListView is loaded inside StackLayout, need to set the HorizontalOptions and VerticalOptions as LayoutOptions.FillAndExpand. Because StackLayout positions the child element one after other either horizontally or vertically based on the orientation of StackLayout.  We have already mentioned this on our UG documentation. 

You can refer the below UG link for further details. 

 
Please let us know if you require further assistance. 

Regards, 
Rawoof M. 


Loader.
Up arrow icon