DropDownList Popup Width

7 posts, 1 answers
  1. Roberto Wenzel
    Roberto Wenzel avatar
    41 posts
    Member since:
    Sep 2012

    Posted 06 Feb 2011 Link to this post

    Hello,
    I am trying to solve this simply soundling problem for hour now. I am trying to adjust the minimum width of the popup of a DropDownList.

    I tried something like 
    rddl_Consignor_Iso.Popup.MinimumSize = New Size(500, 200)
    or 
    
    rddl_Consignor_Iso.DropDownListElement.DropDownMinSize = New Size(500, 200)
    or
    
    rddl_Consignor_Iso.DropDownMinSize = New Size(500, 200)
    
    and some other coding.
    All worked fine, when using the arrow button with the mouse. The popup then is in the expected width. But when entering the box using the keyboard and typing some letters, the box pops up only in the same width as the DropDownList control. I'm getting mad on this. Which value do I have to set to get an acceptable result? Cheers Roberto
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Feb 2011 Link to this post

    Hello Roberto,

    The following code should help you

    ' set the auto complete suggest
    Me.RadDropDownList2.AutoCompleteMode = AutoCompleteMode.Suggest
    ' set the min size of the drop down
    RadDropDownList2.DropDownListElement.DropDownMinSize = New Size(275, 0)
    ' and the size of the auto complete drop down
    RadDropDownList2.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMinSize = New Size(275, 0)

    Let me know if you need further help
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Roberto Wenzel
    Roberto Wenzel avatar
    41 posts
    Member since:
    Sep 2012

    Posted 07 Feb 2011 Link to this post

    Thanks a lot Richard!
    Especially the last line of code is what I was looking for.
    Obviously I didn't dig deep enough -;)
    Cheers Roberto
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 07 Feb 2011 Link to this post

    You're welcome. glad it helped.
    Richard
  6. Clive
    Clive avatar
    12 posts
    Member since:
    Sep 2011

    Posted 17 Nov 2011 Link to this post

    Thanks, helped me too.

    I originally tried using the  DropDownWidth property. that didn't work, then I tried the Popup.Width property. That worked when you used the drop down arrow with the mouse, but not for keyboard entry. Interesting that there are multiple popups for the drop down.. makes sense when you think about it, but not obvious enough for me as a user :)

     

  7. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 18 Nov 2011 Link to this post

    Hi Clive,

    Thank you for writing.

    It is normal to see both popups and this behavior is by design. We are following the behavior of the standard Microsoft ComboBox. You could apply the solution provided by Richard.

    I hope this helps.

    Regards,
    Peter
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  8. Aaron
    Aaron avatar
    3 posts
    Member since:
    Dec 2011

    Posted 09 Jan 2012 Link to this post

    This thread helped me with the same issue. I was setting the RadDropDownList.Popup.Width. 

    I assumed that there must be some other list object that was being used when autoSuggest was happening I just was unable to figure out what the object was through the standard documentation. 

    Thanks.
Back to Top
UI for WinForms is Visual Studio 2017 Ready