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

[Solved] Self Correcting DropDownWidth?

3 Answers 167 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sarah
Top achievements
Rank 1
Sarah asked on 15 Apr 2008, 05:18 PM
I would like the drop down width to be as large as it needs to be to show the data without wrapping and horizontal scroll.  Is it possible for the Combo to determine on it's own how wide it needs to be?

I could count the character of the largest item - but that's not a very good solution since a change in styles will change how much space you need.

Thanks

3 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 16 Apr 2008, 02:32 PM
Hello Sarah,

We tried to implement variable width of the dropdown for the ASP.NET AJAX version of the control, but unfortunately it breaks other functionalities of the control. In a word, this feature will not be implemented in RadComboBox for ASP.NET AJAX.

Please excuse us for the inconvenience we might have caused you.

Greetings,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
A
Top achievements
Rank 1
answered on 24 Apr 2008, 02:29 PM
Hi, I am implementing multi-column combobox which is added programmatically to the ASPX page and the number of columns is also dynamic.

Is there any way to access the dropdown related DIV's created inside my COMBOBOX control object during prerender or Render methods in the ASPX page life cycle so I can make style changes to some of the css properties defined in the combobox_telerik css classes.

0
Nikolay
Telerik team
answered on 25 Apr 2008, 01:41 PM
Hello A,

You can use the CssClass property of the items at the server-side and set this property to the style name you would like to be applied to the items. This can be done either in the page_load or prerender event of the page.

Otherwise, you should use the client-side API to get the DOM elements of the items and change their style. For more details about the client-side object model of the combobox please refer ti the following articles:

RadComboBox object

RadComboBoxItem object

Hope this helps.

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
Sarah
Top achievements
Rank 1
Answers by
Paul
Telerik team
A
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or