Event for selecting the current selecteditem

5 posts, 0 answers
  1. pierre-jean
    pierre-jean avatar
    157 posts
    Member since:
    Apr 2011

    Posted 09 Oct 2019 Link to this post

    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

  2. Nadya
    Admin
    Nadya avatar
    482 posts

    Posted 10 Oct 2019 Link to this post

    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.
  3. pierre-jean
    pierre-jean avatar
    157 posts
    Member since:
    Apr 2011

    Posted 10 Oct 2019 in reply to Nadya Link to this post

    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

  4. Nadya
    Admin
    Nadya avatar
    482 posts

    Posted 10 Oct 2019 Link to this post

    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.
  5. pierre-jean
    pierre-jean avatar
    157 posts
    Member since:
    Apr 2011

    Posted 10 Oct 2019 in reply to Nadya Link to this post

    Hello Nadya

    Thanks a lot for your reply and for being very reactiv

    It's all OK

    By for now

    Pierre-Jean

Back to Top