Editable combobox update text binding with each character typed

9 posts, 0 answers
  1. Adam
    Adam  avatar
    30 posts
    Member since:
    Jun 2009

    Posted 29 Oct 2009 Link to this post

    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.
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 05 Nov 2009 Link to this post

    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.
  3. DevCraft banner
  4. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 09 Apr 2010 Link to this post

    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
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 09 Apr 2010 Link to this post

    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.
  6. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 09 Apr 2010 Link to this post

    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
  7. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 09 Apr 2010 Link to this post

    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.
  8. Donna
    Admin
    Donna avatar
    67 posts

    Posted 09 Apr 2010 Link to this post

    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.
  9. Deven
    Deven avatar
    33 posts
    Member since:
    Apr 2009

    Posted 14 Apr 2010 Link to this post

    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

  10. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 16 Apr 2010 Link to this post

    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.
Back to Top
DevCraft banner