- Home
- Forum
- Xamarin.Forms
- How to have autocomplete height grow as items are selected
How to have autocomplete height grow as items are selected
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
Any tips or suggestions would be greatly appreciated.
Attachment: MainPage_6a8b74b9.zip
SIGN IN To post a reply.
3 Replies
SK
Selva Kumar Veerakrishnan
Syncfusion Team
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.
Regards,
Selva Kumar V.
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.
Regards,
Selva Kumar V.
MT
Minh Tran
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?
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?
SK
Selva Kumar Veerakrishnan
Syncfusion Team
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.
Sample link: http://www.syncfusion.com/downloads/support/directtrac/228799/ze/SfAutoCompleteSample-1652816465
Please check with the above sample and let us know if you have any clarification on this.
Regards,
Selva Kumar V.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MT Minh Tran
- Feb 21, 2019 12:21 AM UTC
- Feb 25, 2019 12:56 PM UTC