Autocomplete list size

6 posts, 0 answers
  1. Alex
    Alex avatar
    2 posts
    Member since:
    Dec 2009

    Posted 12 Jan 2011 Link to this post

    Hello,

    I am trying to find out if there is a way to make an autocomplete list to be wider by default. There is a property DropDownMinSize that allows changing the minimum size for the full drop down list, but the one that pops up as user start typing with AutoComplete mode set to SuggestAppend is always sized to the width of the control. How do I make it match the size of a full drop down list?

    Thanks.
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 14 Jan 2011 Link to this post

    Hi Alex,

    Thank you for the question.

    You can set the size of the auto suggest popup using the following code:

    radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMinSize = new Size(300, 300)

    The code snippet below demonstrates how to set the size of the main popup:
    radDropDownList1.DropDownListElement.DropDownMinSize = new Size(200,200)

    I hope this helps

     

    Regards,
    Peter
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Bruno
    Bruno avatar
    3 posts
    Member since:
    Dec 2010

    Posted 17 Mar 2011 Link to this post

    Is there a way to keep the appearance of the AutoCompleteSuggest:DropDownList equal to the main DropDownList?
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 17 Mar 2011 Link to this post

    Hi Bruno,

    Thank you for writing back.

    The drop-down popup that contains the items and the autocomplete drop-down popup are different objects and when you set a property to the first popup, this setting is not applied automatically to the second one. So, if you want to change the SizingMode of the autocomplete popup, you should apply this setting to the DropDownList of the AutoCompleteSuggest object:

    radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownSizingMode = Telerik.WinControls.UI.SizingMode.None;

    This will prevent the users from resizing the AutoCompleteSuggest popup.

    We would kindly ask you to use just one support channel to ask one specific question. Posting the same questions more than once may slow down our response time, because we need to review and address two or more tickets instead of one. Thank you for your understanding.

    Do not hesitate to contact us if you have other questions.

     

    All the best,
    Peter
    the Telerik team
  6. Rowen
    Rowen avatar
    13 posts
    Member since:
    Aug 2008

    Posted 21 Apr 2012 Link to this post

    Can I suggest that the autocomplete list should automatically be the same size as the dropdown list - this makes sense since it will always be the same data, so current behaviour seems like a bug really.
  7. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 23 Apr 2012 Link to this post

    Hi Rowen,

    Thank you for writing.

    This is the expected behavior from RadDropDownList. As you see in this thread, you can easy access and re-size both popups:
    radDropDownList1.DropDownListElement.AutoCompleteSuggest.DropDownList.DropDownMinSize = new Size(400, 200);
    radDropDownList1.DropDownMinSize = new Size(400, 200);

     Let me know if this solution is applicable for you.

    Greetings,
    Peter
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready