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

Key Down event

4 Answers 71 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Anan
Top achievements
Rank 1
Anan asked on 15 Jun 2010, 01:23 AM
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....

4 Answers, 1 is accepted

Sort by
0
Anan
Top achievements
Rank 1
answered on 15 Jun 2010, 04:57 AM
anybody plss...
0
Accepted
Konstantina
Telerik team
answered on 18 Jun 2010, 08:05 AM
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
0
Anan
Top achievements
Rank 1
answered on 20 Jun 2010, 06:01 AM
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
0
Dani
Telerik team
answered on 23 Jun 2010, 02:23 PM
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
Tags
ComboBox
Asked by
Anan
Top achievements
Rank 1
Answers by
Anan
Top achievements
Rank 1
Konstantina
Telerik team
Dani
Telerik team
Share this question
or