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

Auto width? Keeping large items left justified?

7 Answers 130 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John Fairbanks
Top achievements
Rank 1
John Fairbanks asked on 15 Nov 2009, 12:03 AM
Hi folks,  I've just dropped the RadComboBox into an existing web app and there are two things I notice right off.  First, the old stock DropDownList control would size its width to be able to display the largest item in the list... I don't know if that is desireable or not (the new way is growing on me) but if I embrace this new and potentially layout preserving change then I have a second problem:  when I am typing and it is doing the auto-complete, the item in the edit box is losing a bit of the left hand side... looks like just a couple of characters worth of pixels but it makes it so you can't see the first part of what you are typing.  Any way to turn that off??

7 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 17 Nov 2009, 04:37 PM
Hello John Fairbanks,

RadComboBox does not support this functionality due to the fact that there is no way of determining, on the server, the font that will be used on the client (it can be defined inline, through CSS rules on the page, through linked CSS files and more importantly outside of the built-in skin) in which case the final width will be unknown.

You could implement a custom solution in your case, provided that you know the used font and calculate the width of the longest Item on the server based on that font.

On the other hand we will implement auto-width of the drop down on the client in future versions of RadComboBox.

Best wishes,
Simon
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
John Fairbanks
Top achievements
Rank 1
answered on 18 Nov 2009, 03:24 PM
Well, feel free to let me know if it gets addressed and we'll re-evaluate.  Unfortunately right now the only control we are interested in is this combo box and we just can't see paying for the whole tool set when the control doesn't really work properly for what we need.  The two items which cost y'all this sale are: 

1) Inability to size for large content, or even if that isn't handled, the inability to keep selections left justified while typing in the edit box

2) Once a selection is made, leaving the text still not left aligned.  I know y'all have a work-around for this by adding a reposition script to the selected item changed event, but it bothers me that I should have to do something like that to obtain the functionality everyone would want.

On a happy note, I was looking to see how y'all would handle a question in your forums and the responses were well considered and timely, so quality of support would not be a concern. :-)
0
Simon
Telerik team
answered on 18 Nov 2009, 03:44 PM
Hi John Fairbanks,

Thank you for sharing your feedback.

As I already mentioned we have plans for implementing the first part of your first suggestion. Additionally we will consider integrating the cursor reposition script in RadComboBox's code.

Still I am not sure what this means - "the inability to keep selections left justified while typing in the edit box". Could you clarify on it as well?

Greetings,
Simon
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
John Fairbanks
Top achievements
Rank 1
answered on 18 Nov 2009, 03:56 PM
Sure... let's say that the combo box item text is "1234 - This is a test of a really long entry to see what it does".  When you tab into the control and start typing "1", the item auto-selects as the best match.  However as you continue to type, you lose more and more of the left side.  After typing "1234" the text in the edit box will have shifted off the left hand side so that you can no longer see the 1 and 2 and all you see is the "34 - This is a test...".  In our case, losing the left hand side in a combo that has a couple thousand entries that are very similar leaves you completely lost as to what you have selected.
0
Simon
Telerik team
answered on 18 Nov 2009, 04:07 PM
Hello John Fairbanks,

Thank you for the explanation.

We are not sure how this issue can be resolved as it is the normal behavior of an input type text.

A possible workaround is to simply increase the RadComboBox's width manually as I suggested to you previously.

(I also updated your Telerik points for sharing your suggestions for improvement.)

Regards,
Simon
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
John Fairbanks
Top achievements
Rank 1
answered on 18 Nov 2009, 04:39 PM
Yeah... I see what you're saying.  Thanks.
0
anu
Top achievements
Rank 1
answered on 10 Jun 2010, 11:12 AM
HI team,

i am using rad combobox.i am facing one issue.
i am using IE 7 and IE 8

i have set width in code behind for rad combobox. its showing in IE 8 correct.

but in IE 7 not showing the width.

please help me to solve the problem.
please find the attachment
Tags
ComboBox
Asked by
John Fairbanks
Top achievements
Rank 1
Answers by
Simon
Telerik team
John Fairbanks
Top achievements
Rank 1
anu
Top achievements
Rank 1
Share this question
or