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

Issues with autocomplete editable and readonly

1 Answer 229 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Tony Sun
Top achievements
Rank 1
Tony Sun asked on 25 Feb 2010, 03:07 AM
Issues 1:
When you type into a read only auto completing combo box, then select the option you where typing in, the box does NOT fill in the complete name: e.g. In the below combo box, typing in "Ad" (for Adam) then clicking Adam (or pressing enter/tab), will NOT say "Adam" in the combo box, instead it will just say "Ad"

(My aim for the control was for a list of names to show up, where you can ONLY select items on the list via mouse/keyboard, and you can't randomly type in anything -hence the read only flag -and "" blank is a selectable item)

I have the following ComboBox:
<telerikInput:RadComboBox x:Name="cb_saleby" HorizontalAlignment="Left" VerticalAlignment="Top" 
                                          Margin="10" Canvas.Left="81" Height="22" Width="207" IsEditable="True" Canvas.Top="19" IsFilteringEnabled="True" GotFocus="cb_saleby_GotFocus" IsReadOnly="True"
                    <telerikInput:RadComboBoxItem Content=""/> 
                    <telerikInput:RadComboBoxItem Content=" "/> 
                    <telerikInput:RadComboBoxItem Content="Adam"/> 
                    <telerikInput:RadComboBoxItem Content="Alex"/> 
                    <telerikInput:RadComboBoxItem Content="Alexis"/> 
                    <telerikInput:RadComboBoxItem Content="Andrew"/> 
                    <telerikInput:RadComboBoxItem Content="Bazza"/> 
                    <telerikInput:RadComboBoxItem Content="Add new staff.."/> 
                    <telerikInput:RadComboBoxItem Content="Add staff from another practice.."/> 
                </telerikInput:RadComboBox> 

Where the key features are:
Filtering is on
Read Only is on
(And I'm fairly certain the default filtering is "Starting With xxx")


I've also made my drop down start opened via the Got Focus event:
            Telerik.Windows.Controls.RadComboBox rcb = (Telerik.Windows.Controls.RadComboBox)sender; 
            rcb.IsDropDownOpen = true



Then when I run it, I type: "Ad" (Not case sensitive apparently -is not really an issue)
-I can see the drop down will highlight the  "Adam" item. (Also the two "Add ...." items are also shown but this isn't relevant)
Then if I either Click on Adam -or- press enter (to select the highlighted Adam)
-It will not change the text to Adam

However, if I just select a different one (i.e. When the box has no text in it and all items are showing) it will change the text to the whole word. E.g. if I click on "Alex" or press the down arrow key and press enter on Alex, it will change the text to Alex.




Issues 2:
The ComboBox doesn't update the text properly when you backspace away all the characters and always shows the very first character
e.g. If I type in "Adam" (in the above example code), then press backspace 4 times, I would expect the text to be = "" (i.e. no text)
However, the text will always display the first character still "A" (unexpected?), however, the drop down list is correctly showing an unfiltered list (expected).








Unrelated Items:
(Should I make a new post for each of the below?)

It would be nice if the editable ComboBox had a blinking i-beam text cursor whilst editing

It would also be nice if there was more support for "" blank content selectable items (or some kind of null item as mentioned in other posts)

When you backspace away some (but not all) letters, it brings up a new filtered list where the top item is selected. However, when you backspace away ALL letters, it will remain selecting the last item. It would be nice if there was more consistency between these two. (e.g. Always last, or always top)

(Sorry if I seem demanding :S, I realize that I can do most of these above suggestions with events, but I figured that someone has to say them)


(Oh and on a completely unrelated note, is there a way to do signatures on this forum?)
Silverlight 4
Visual Studio 2010 Beta
Telerik Q3 2009

1 Answer, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 25 Feb 2010, 09:49 AM
Hi Tony,

I would recommend trying the latest internal build of RadComboBox, where most of the issues you reported are fixed (except the backspace inconsistency and the I beam):
http://www.telerik.com/account/downloads/internal-builds.aspx

We already have OpenDropDownOnFocus property which could be of help.

The "I" beam comes from the TextBox inside the RadComboBox template. It is automatically hidden when IsReadOnly is true, hence RadComboBox does not display it too.

There are ClearButtonVisibility/ClearButtonContent properties in RadComboBox, which display a button above the ScrollViewer in the drop-down, that clears the selection. This was recently requested by a client who did not wanted to add empty items in his data sources. I suppose that you could take advantage from it too.

Best wishes,
Valeri Hristov
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
Asked by
Tony Sun
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or