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
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
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
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
Hello Nadya
Thanks a lot for your reply and for being very reactiv
It's all OK
By for now
Pierre-Jean