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

Editable combobox update text binding with each character typed

8 Answers 360 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 29 Oct 2009, 10:37 PM
I'm using a combo box bound to a list of items with iseditable set to true. When text is typed in the combo box and an item is matched, the selecteditem binding is updated. This is fine. However, if the user enters text that is not in the list I want to update the Text binding with each character. How can I accomplish this? Thanks.

8 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 05 Nov 2009, 11:44 AM
Hi Adam ,

First of all I want to apologize for the delayed answer.

Regarding the Text binding - RadComboBox will automatically update its Text property with the entered text on each keystroke. However, if TextSearch is enabled, the control will autocomplete the entered text with the text of the first matching item, e.g. if you have the following items:
"item 1"
"item 2"
"item 3"
and you begin typing "it", the Text property will become "item 1". If you type "aaa", the Text will be "aaa".

To disable the autocomplete you need to set IsTextSearchEnabled = false on RadComboBox.

Best wishes,
Valeri Hristov
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
Deven
Top achievements
Rank 1
answered on 09 Apr 2010, 11:44 AM
I am using MVVM and also control validation. I want to raise an error if the typed text does not match any item in the collection. However, the text property in the model is not updated while the user is typing in the combobox. Also after invalidating, if user blanks out the text I want to remove error indicator on the control, but the setter of the selecteditem does not fire at all.

To clarify here is the scenario: In my collection I have Apple, Orange, Pear and Pineapple. The combobox text and selected item is bound to the model. the user types "a", the model immediately gets updated, where selected item becomes Apple and Text is null. Next user continues typing "b", the model updates again where selecteditem is null and text is "Apple" instead of "ab".

Anyway I can around updating the text along with selected item?

Thanks
Deven
0
Valeri Hristov
Telerik team
answered on 09 Apr 2010, 12:21 PM
Hi Deven,

What's the version of RadControls for Silverlight you are using? The most recent versions (Q1 2010 and the latest internal builds of Q3 2009) should update the Text property on every keystroke.

Regards,
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.
0
Deven
Top achievements
Rank 1
answered on 09 Apr 2010, 12:25 PM
I am using Q3 2009 release version. I know this is not the place and you are not the right person to ask this question. But how can I get licensed version of Q1 2010. We have bought full set of Telerik controls. But I do not see where I can download licensed version from.

I did contact your sales, but did not get any reply from them.

Thanks
Deven
0
Valeri Hristov
Telerik team
answered on 09 Apr 2010, 12:58 PM
Hello Deven,

I had a look at your licenses and it seems that you should be able to download the recent versions of RadControls. I will forward this forum thread to the sales team, they should be able to fix the problem.

Greetings,
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.
0
Donna
Telerik team
answered on 09 Apr 2010, 01:31 PM
Hi Deven,

It seems you are not added as a developer to the Telerik Premium Collection license under your account. That's the reason why you are not able to access the latest Q1 2010 release. Please note that only licensed developers can download the software. In order to get the files, you will have to either remove the current developer from the license and add yourself instead, or purchase an additional license.

I hope this clarifies the case up. If you have any more questions, please let me know.

Best wishes,
Donna
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.
0
Deven
Top achievements
Rank 1
answered on 14 Apr 2010, 04:21 PM

Hi Donna, all is sorted with the license now. Thank you.

 

Hi Valeri, now I am updated to the latest release version. The text does get updated now. However, the SelectedItem fires before the Text change. Again scenario is when a user first types and a valid record is picked. Then user empties the text box to unselect, at this point the selectedItem fires with null value, however in the setter of selected item, when I check the Text value it still shows the last selection description instead of showing empty.

Hope I stated my issue properly. 

My target is to show validation error if there is text typed in the combobox with out a valid selection. If there is no text, I dont want to show any error.


Thanks
Deven

0
Valeri Hristov
Telerik team
answered on 16 Apr 2010, 04:12 PM
Hello Deven,

Is it possible to perform the operation in reverse? Bind the Text property with the validation settings and when it is set, check the SelectedItem, which will be already set at this time.

I could change the order of setting the SelectedItem and the Text properties, but unexpected side effects could occur. We could try this in the first internal build after the Service Pack next week.

Regards,
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
Adam
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Deven
Top achievements
Rank 1
Donna
Telerik team
Share this question
or