RadComboBox - SpaceBar Causes Text To Selected

2 posts, 0 answers
  1. mc
    mc avatar
    1 posts
    Member since:
    Dec 2006

    Posted 25 Sep 2008 Link to this post

    I am attempting to use your Silverlight ComboBox to autosuggest data.  I have the ComboBox working with the RadComboBox items bound/populated via a WCF service which returns a set of 10 choices.  This works fine and I am able to update the options based on the data entered into the textbox portion of the control.  The issue I have is the when you press the spacebar, as required for the space between word, the control closes the list of options despite the fact that I have the StaysOpenOnEdit="True".  It also does not seem to enter the space into the field until I press spacebar a second time.  Then if you open the list of options the text field becomes highlight/selected so that if you start typing you over-write your waht you already typed.  In order to work around this I tried adding the following in a KeyUp and KeyDown methods:

    if (e.Key == Key.Space)

    {

    ((RadComboBox)sender).Text = String.Concat(((RadComboBox)sender).Text.ToString(), " ");
    e.Handled =

    true;

    }

    this does not seem to prevent the close of the list and it places the cursor in the text field to the begining - another issue.  I also tried adding a statement that set the IsDropDownOpen = true but this caused entered text to be highlighted. 

    Is there a way to either deselect the entered text or open the list without effecting the selection of the entered text?

    Thanks,
    Chris Bywaters

  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 26 Sep 2008 Link to this post

    Hello Chris,

    This is a known problem in RadComboBox, which will be resolved in the next update of RadControls for Silverlight, which is due in several days.

    Best wishes,
    Valeri Hristov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top