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

RadComboBox auto-width

26 Answers 1553 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tyson Nero
Top achievements
Rank 1
Tyson Nero asked on 11 Oct 2010, 05:05 PM
Is auto-width supported for the RadComboBox? Is there a way to make it grow horizontally to the largest item in the select list?

26 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Oct 2010, 10:38 AM
Hello,


If you want to resize the dropdown based on the item text length, then the following code library will help you
Dynamic Dropdown width


-Shinu.
0
Chris McGrath
Top achievements
Rank 1
answered on 18 Mar 2011, 05:02 PM
Are there plans to make this a built-in feature?  Since the standard DropDownList control automatically sizes itself to the data in the dropdown, it makes sense that many people might want to mimic this behavior without creating code for every single combobox on a form.

I would expect two properties:  One that autosizes the dropdown width, and one that autosizes the combo itself.

I very much like some of the features of the telerik drop down, but hate that it takes so much work to make it work the way standard dropdowns do.

PS. This code seems to far overcompensate for the text width when using Arial as the font (in both the control's skin and the TextWidth function).
0
Helen
Telerik team
answered on 21 Mar 2011, 06:02 PM
Hello Chris,

We've logged this feature. Our developers will consider implementing it in the future.

Kind regards,
Helen
the Telerik team
0
Steve
Top achievements
Rank 1
answered on 04 Aug 2011, 04:25 AM

DropdownWidth works
0
Mike
Top achievements
Rank 1
answered on 31 Aug 2011, 03:10 PM
I second the request for an auto-width property.  I really dislike the look of word-wrapped combo box entries.  Like probably most developers, the contents of my combo boxes come from data in a database and I can't specify one width at design time that is going to look good in all cases.  And copying that c# code all over the application to calculate the width in the DataBound event is a huge hassle.
0
Simon
Telerik team
answered on 01 Sep 2011, 08:53 AM
Hi Mike,

We already have the 'drop down auto width' feature in our backlog and will implement it in future releases (an exact time frame is unavailable at the moment).

Greetings,
Simon
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Patrice Boissonneault
Top achievements
Rank 2
answered on 09 Sep 2011, 08:23 PM
+1 vote for this feature.
0
Gint
Top achievements
Rank 1
answered on 14 Sep 2011, 09:34 AM
+1
0
Dwight
Top achievements
Rank 1
answered on 11 Oct 2011, 01:57 AM
Would be very useful for me too + 1
0
Tom Bruinsma
Top achievements
Rank 1
answered on 07 Nov 2011, 08:50 PM
+1, we went back to html selects because of this behavior.
0
Alex Krusz
Top achievements
Rank 1
answered on 14 Nov 2011, 11:24 PM
rcbSlide will by default be as narrow as the dropdown selector's text; it does not expand horizontally to fit its content, so a horizontal scrollbar will be created if the dropdown item text is wide enough. This is fixable by manually setting rcbSlide's(minimum) size to be larger than its contents. This allows the content (rcbList,rcbScroll, rcbItem) to intelligently resize horizonally up to the width of rcbSlide.

Here is my CSS fix for the problem.

/* Allows radComboBox dropdowns to expand horizontally
   rather than use a scrollbar */
.rcbSlide {
    width: 500px;
}
 
.rcbScroll .rcbWidth {
    min-width: 150px;
    width: auto;
}
 
.RadComboBoxDropDown {
    width: auto !important;
}
 
.rcbList {
    position: relative;
    width: auto;
}
0
JDP
Top achievements
Rank 1
answered on 26 Jan 2012, 04:30 PM
I vote for this as well. Spent 15 minutes of my time looking for what I thought would be a standard.
0
App Visible
Top achievements
Rank 1
answered on 08 Feb 2012, 10:02 AM
Dear Alex,
The solution work perfect in Firefox but doesn't work on IE.You have any fix for this.Thanks.
0
improwise
Top achievements
Rank 1
Iron
Iron
answered on 27 Mar 2012, 03:23 PM
Any news on this? Really want this feature as well

+1
0
Mike
Top achievements
Rank 1
answered on 27 Mar 2012, 04:49 PM
I'm still really wanting and needing this feature.  This issue came up today in a demo.
0
Dwight
Top achievements
Rank 1
answered on 28 Mar 2012, 12:27 AM
I agree, it is definitely a big drawback of an otherwise excellent control
0
chrisL
Top achievements
Rank 1
answered on 22 Jun 2012, 02:26 AM
+1
0
LM
Top achievements
Rank 1
answered on 18 Jul 2012, 06:27 PM
+1

This is a big minus, in some situations it's unusable without having the width dynamic.
0
CCC
Top achievements
Rank 1
answered on 31 Oct 2012, 05:47 PM
+1
This would be very useful. Please make this feature ready asap...
0
brian
Top achievements
Rank 1
answered on 07 Nov 2012, 10:39 PM
telerik?
0
Kate
Telerik team
answered on 08 Nov 2012, 10:12 AM
Hi,

We have already logged the request for the auto-width feature for the RadComboBox control and we will be working on this feature during the current Q1 2013. Thank you all for the feedback and for voting for it. 

All the best,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Karrie
Top achievements
Rank 1
answered on 03 Apr 2013, 02:50 PM


Good to hear. 

+1 for our team as well.
0
Kate
Telerik team
answered on 08 Apr 2013, 07:58 AM
Hello Karrie,

Please refer to this demo and help article where you can find an example and more detailed information regarding the new functionality of the RadComboBox control that we recently implemented.

Kind regards,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Aaron Abdis
Top achievements
Rank 1
answered on 30 Sep 2013, 05:02 PM
another +1 for autowidth feature of the control itself (not the dropdown portion, i know that's already there)
0
Somnath Kharat
Top achievements
Rank 2
answered on 01 Oct 2013, 10:43 AM
I am also facing this problem .I used the Autowidth concept but its not working for me.

I tried using this property 'DropDownAutoWidth="Enabled"

 
0
Kate
Telerik team
answered on 03 Oct 2013, 12:34 PM
Hello,

@Aaron: I will forward you request to our development team so that they can review it and possibly include it with the improvements of the control.

@Somnath: Can you please open a separate forum post or a support ticket where you can provide more information on the specific scenario that you have as well as provide the version of the RadControls that you use? Thus, we can inspect the code that you have from our side and assist you in the most efficient way. 

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
ComboBox
Asked by
Tyson Nero
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Chris McGrath
Top achievements
Rank 1
Helen
Telerik team
Steve
Top achievements
Rank 1
Mike
Top achievements
Rank 1
Simon
Telerik team
Patrice Boissonneault
Top achievements
Rank 2
Gint
Top achievements
Rank 1
Dwight
Top achievements
Rank 1
Tom Bruinsma
Top achievements
Rank 1
Alex Krusz
Top achievements
Rank 1
JDP
Top achievements
Rank 1
App Visible
Top achievements
Rank 1
improwise
Top achievements
Rank 1
Iron
Iron
chrisL
Top achievements
Rank 1
LM
Top achievements
Rank 1
CCC
Top achievements
Rank 1
brian
Top achievements
Rank 1
Kate
Telerik team
Karrie
Top achievements
Rank 1
Aaron Abdis
Top achievements
Rank 1
Somnath Kharat
Top achievements
Rank 2
Share this question
or