Control and subcontrols with RadComboBox

Thread is closed for posting
4 posts, 0 answers
  1. Bartlomiej Wojdyna
    Bartlomiej Wojdyna avatar
    5 posts
    Member since:
    Oct 2009

    Posted 23 Nov 2009 Link to this post

    I created RadControl with RadComboBox which was anchored to Left and Right. This RadControl I added to RadForm but in different size then oryginal Control and also anchored to Right and Left. Unfortunately RadComboBox had wrong size. What should I do to fix this problem? At this momemnt a change size dynamically but is only way to fix it?
  2. Deyan
    Deyan avatar
    2147 posts

    Posted 24 Nov 2009 Link to this post

    Hello Bartlomiej,

    Thanks for your question.

    Please note that RadComboBox control has its AutoSize property set to true by default. That said, this control automatically determines its size based on its contents. This causes the anchoring mechanism to fail since the control cannot be resized.

    My advice is to try setting AutoSize property of the control to false and after that set its Anchor property.

    I hope this helps. You can write back anytime you need further assistance.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Justin Kessel
    Justin Kessel avatar
    1 posts
    Member since:
    May 2010

    Posted 06 May 2010 Link to this post

    I hope somebody follows old posts and is able to see this question. 

    I have a similar issue as the original poster and the autoSize = false fixed my anchoring problem.  But the ComboBox I am anchoring has dynamic content and we would like it to be resized dynamically to the length of the longest element from the database.  Is Deyan's response saying that we will have to be responsible for dynamically sizing our comboBox elements in the code behind, or is there some other built in way to increase the width to fit the longest element?

    Thanks for your time!
  4. Deyan
    Deyan avatar
    2147 posts

    Posted 12 May 2010 Link to this post

    Hi Justin Kessel,

    Thanks for writing.

    In general, there is a way to increase the width of the drop-down. You can use the DropDownWidth property of the RadComboBox control for this purpose. However, you will have to manually calculate the width which is needed to correctly display the content loaded in the combo box.

    I hope this answers your question.

    Kind regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top