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

Control and subcontrols with RadComboBox

3 Answers 109 Views
ComboBox and ListBox (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bartlomiej Wojdyna
Top achievements
Rank 1
Bartlomiej Wojdyna asked on 23 Nov 2009, 01:53 PM
Hello,
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?

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 24 Nov 2009, 03:30 PM
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,
Deyan
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.
0
Justin Kessel
Top achievements
Rank 1
answered on 06 May 2010, 03:53 PM
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!
0
Deyan
Telerik team
answered on 12 May 2010, 09:30 AM
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,
Deyan
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.
Tags
ComboBox and ListBox (obsolete as of Q2 2010)
Asked by
Bartlomiej Wojdyna
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Justin Kessel
Top achievements
Rank 1
Share this question
or