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

ComboBox DropDownOpened event calls DropDownClosed event

1 Answer 78 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Dandan
Top achievements
Rank 1
Dandan asked on 07 Apr 2009, 11:56 AM

Hi,

I have a problem in my application:

 

I added combo box with 2 events: DropDownClosed and DropDownOpened.

In DropDownClosed event, I want to add new item to the ItemsSource and fixed the selected item to be the new item.

In DropDownOpened event, I want to remove the item from the ItemsSource.

 

But, when closing the combo box, after DropDownOpened event happened, also DropDownClosed event happened.

 In simple application, it isn’t happened.

 

Any idea?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 07 Apr 2009, 01:11 PM
Hi Dandan,

I am sorry but unfortunately I was not able to understand what is happening. Could you please provide a sample project where this is happening?

It seems that you are trying to set how the selected item looks, if so you can use the SelectionBoxItemTemplate property. It will change the outlook of the currently selected item.

If you need to set an "Empty Message", like so:



Please, refer to this project:

http://www.telerik.com/ClientsFiles/122263_comboemptymessage.zip

Best wishes,
Kaloyan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Dandan
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or