This is a migrated thread and some comments may be shown as answers.

Fix the width of the dropdown

1 Answer 44 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
zaphod94
Top achievements
Rank 1
zaphod94 asked on 21 May 2010, 02:28 PM
The dropdown list for the combo box expands to fit the longest item. How do I prevent this? I want the dropdown to be the same size as the combo-box

TIA

1 Answer, 1 is accepted

Sort by
0
zaphod94
Top achievements
Rank 1
answered on 23 May 2010, 01:50 AM
To ensure that the width of the dropdown matches the width of the combo-box, you will need to use a DataTemplate for the items in the dropdown. The DataTemplate can be a TextBox whose width is set to the desired with.

The numbers that worked for me are

1. MaxWidth of the telerik:RadCombobox = 345

in conjunction with

2. DataTemplate TextBox width = 300

This made the dropdown width the same as the combobox

HTH

Tags
ComboBox
Asked by
zaphod94
Top achievements
Rank 1
Answers by
zaphod94
Top achievements
Rank 1
Share this question
or