Key Down event

5 posts, 1 answers
  1. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 14 Jun 2010 Link to this post

    Hello

    I am using the Silverlight 3 latest internal builds. My combo box has autocomplete on with Iseditable false.

    1. Is there a way to have both autocomplete and isfiltering same time?
    2. Also, when user presses delete key, it should clear my selection. I see that when autocomplete is turned on, key down event is not raised. I need to have both the features, autocomplete and clear selection on delete key.

    Any help is greatly appreciated....
  2. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 14 Jun 2010 Link to this post

    anybody plss...
  3. DevCraft banner
  4. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 18 Jun 2010 Link to this post

    Hi Anan,

    Thank you for contacting us.

    Straight to your questions:
    1. Unfortunately, this cannot be achieved with the current implementation of the control. We have it in our To-Do list and we will include it in one of our future releases.
    2. To achieve that you can do the following:
    - Add the following Handler to your ComboBox:
    myCombo.AddHandler(FrameworkElement.KeyDownEvent, new KeyEventHandler(myCombo_KeyDown), true);

    -Then you can handle the Delete KeyDown event:

    void myCombo_KeyDown(object sender, KeyEventArgs e) 
        
    }

    Hope this helps.

    If you need further assistance please feel free to contact us again.

    Regards,

    Konstantina
    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
  5. Anan
    Anan avatar
    31 posts
    Member since:
    Oct 2009

    Posted 20 Jun 2010 Link to this post

    Hello Konstantina

    Thanks for your reply....AddHandler approach worked for me...

    I would appreciate if you can provide me a sample that styles the combo box. I want to get rid of the weird yellow color when user hovers or selects an item in the combo box. I am not sure why all the telerik controls use that color :). Also, if you can provide a similar samplefor datagrid that would be great.

    Thanks
  6. Dani
    Admin
    Dani avatar
    848 posts

    Posted 23 Jun 2010 Link to this post

    Hi Anan,

    Thank you for your reply.

    Telerik RadControls ship together with a default theme, as well as other themes which can be applied to the controls. The default colors in any of our controls, including the RadComboBox are part of our default  Office Black theme.

    In order to modify the colors which you see on MouseOver, Pressed states, etc, you need to modify the default theme.

    Please find attached a sample application which contains a custom theme. The custom theme is an exact copy of the default theme and you can edit it freely. All needed Brushes, Styles and Templates related to RadComboBox reside in the following ResourceDictionary: 
     /MyClass;component/Generic.xaml  

    You can easily take it from here and customize the colors by changing the Brushes. The ComboBoxButtonChrome  is the Style which is responsible for the look of the ComboBox. (I have modified the MouseOver state for illustration only.)

    For RadGridView I would advice you to post a request in the GridView Forum. This way you would get quicker feedback and help.

    I hope you find this post helpful. Please, write back to us in case you come across any problems with your solution or if you need any further help.


    Best wishes,
    Dani
    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