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

Event for selecting the current selecteditem

4 Answers 75 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
pierre-jean
Top achievements
Rank 1
Veteran
Iron
pierre-jean asked on 09 Oct 2019, 11:39 AM

Hello

is there an event that is fired when the user selects the current selectedItem ?

The "SelectedIndexChanged" is fired only if the index has changed, which is normal, but I would need an event that is fired when the user selects an item in the list even if the index does not change

 

Thanks in advance

Pierre-Jean

4 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 10 Oct 2019, 11:13 AM

Hello Pierre-Jean,

RadDropDownList doesn't have an event for this case. However, I can suggest the PopupClosed event which will fire even if the selected index does not change. If it doesn't achieve the expected result, it would be greatly appreciated if you can provide more details about the exact goal that you are trying to achieve. Thus, we would be able to investigate the precise case and assist you further. 

I am looking forward to your reply.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
pierre-jean
Top achievements
Rank 1
Veteran
Iron
answered on 10 Oct 2019, 02:32 PM

Hello Nadya

Unfortunately the PopupClosed Event is not fired either when the user clics on the first element after populating the itemlist.
The workaround I use is to add an informative text as first item of the list telling the user to select an item in the below list, then the user is forced to select an item other than the first and thus the selectedIndexChanged event is fired. This is quite accepable for me, 
it would be perfect if I could change the font of the fist line alone, to be italic for instance.

Thanks again

Pierre-Jean

0
Nadya | Tech Support Engineer
Telerik team
answered on 10 Oct 2019, 03:17 PM

Hello Pierre-Jean,

I am sorry that the suggested event is not working for you. However, I am glad that you have found a possible solution to achieve your custom requirements. Yes, it is possible to change the font style to italic of the first item in the RadDropDownList.Items collection. This can be achieved via the Font property as shown below:

 Font myFont = new Font("Segoe UI", 14, FontStyle.Italic);
 this.radDropDownList1.Items[0].Font = myFont;

I hope this helps. Should you have any other questions, I will be glad to help.

Regards,
Nadya
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
pierre-jean
Top achievements
Rank 1
Veteran
Iron
answered on 10 Oct 2019, 06:17 PM

Hello Nadya

Thanks a lot for your reply and for being very reactiv

It's all OK

By for now

Pierre-Jean

Tags
DropDownList
Asked by
pierre-jean
Top achievements
Rank 1
Veteran
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
pierre-jean
Top achievements
Rank 1
Veteran
Iron
Share this question
or