Fix the width of the dropdown

2 posts, 0 answers
  1. zaphod94
    zaphod94 avatar
    10 posts
    Member since:
    Jun 2007

    Posted 21 May 2010 Link to this post

    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
  2. zaphod94
    zaphod94 avatar
    10 posts
    Member since:
    Jun 2007

    Posted 22 May 2010 Link to this post

    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

  3. DevCraft banner
Back to Top