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

Dynamic / Auto DropDownItemHeight ?


I've been wondering, if there is a 'dynamic' variant of the DropDownItemHeight method on SfComboBox ?
I've been trying to show a custom view for a SfComboBox, using Grid and labels in grid's rows and columns, like this:

<Grid Padding="10,5,0,0">
<RowDefinition Height="*"/>
<RowDefinition Height="1"/>
<Label Grid.Column="0" Text="{Binding Name}"/>
<Label Grid.Column="1" Text="{Binding}"/>
<Label Grid.Column="2" Text="{Binding}"/>
<Label Grid.Column="3" Text="{Binding}"/>
<Label Grid.Column="4" Text="{Binding}"/>
<BoxView Grid.Row="1" Grid.ColumnSpan="5" Color="LightGray"/>

I removed the irrelevant binding names, except the one causing problem. When the value bound to a Label's Text is long enough, so the Label breaks the line, the row's height doesn't change, which leads to the text represented by the label to be cut off, dependant on the current DropDownItemHeight setting.

Currently, the solution I worked out is to set the value of DropDownItemHeight manually, but then again, each and every row has that height, instead of automatically shrink it to the contents of that row.

1 Reply

HM Hemalatha Marikumar Syncfusion Team January 22, 2020 08:50 AM

Hi Tomasz, 
Greetings from Syncfusion. 
We have analyzed the possibilities of achieving your requirement of "Auto height support for DropDownItem in SfComboBox". We have logged this as a feature request, and you can track the status of this feature implement through below link 
Please cast your vote to make it count. We will prioritize the features every release based on the demands and we do not have an immediate plan to implement this feature since we committed with already planned work. So, this feature will be available in any of our upcoming releases.     
If you have any more specifications/suggestions to the feature request, you can add it as a comment in the portal.  
Hemalatha M. 

Live Chat Icon For mobile
Up arrow icon