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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to have autocomplete height grow as items are selected

Thread ID:





142822 Feb 21,2019 12:21 AM UTC Feb 25,2019 12:56 PM UTC Xamarin.Forms 3
Tags: SfAutoComplete
Minh Tran
Asked On February 21, 2019 12:21 AM UTC

Hi, at the moment I have a grid. Inside this grid is a scrollview, followed by another grid. Inside this Grid, it has 2 columns and many rows. The issue I'm currently having is that the autocomplete doesn't grow in size as more tokens are added. They just get hidden. 

Any tips or suggestions would be greatly appreciated. 

Attachment: MainPage_6a8b74b9.zip

Selva Kumar  Veerakrishnan [Syncfusion]
Replied On February 22, 2019 05:05 AM UTC

Hi Minh,

Greetings from Syncfusion.

In our SfAutoComplete, when selecting multiple item during Token mode, the items will get scrolled inside the SfAutoComplete text box. The size of the control will not change.

Please check by scrolling inside the SfAutoComplete TextBox and let us know if you have any clarification on this.

Selva Kumar V.

Minh Tran
Replied On February 22, 2019 01:56 PM UTC

Hi there,

a scroll in the box is no longer present. The grid that host the data is within a scrollview. Is there a way to get the size to automatically change? 

Selva Kumar  Veerakrishnan [Syncfusion]
Replied On February 25, 2019 12:56 PM UTC

Hi Minh, 
Sorry for the inconvenience. 
We do not have have direct support to change the size of SfAutoComplete. We can use the below given workaournd on SelectionChanged event of SfAutoComplete, during the selection change we have changed the height of SfAutoComplete. 
var autocomplete = (sender as Syncfusion.SfAutoComplete.XForms.SfAutoComplete);
            if (autocomplete.SelectedItem != null && autocomplete.SelectedItem is IList)
                var count = (autocomplete.SelectedItem as IList).Count;
                var extendheight = Math.Ceiling(count / 2d) * 45;
                if (extendheight != 0 && autocomplete.HeightRequest != extendheight)
                    autocomplete.HeightRequest = extendheight;
                else if (extendheight == 0 && autocomplete.HeightRequest != extendheight)
                    autocomplete.HeightRequest = 45;

Please have the sample for the same from the link given below.
Please check with the above sample and let us know if you have any clarification on this. 
Selva Kumar V. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon