Image in null SelectedValue

5 posts, 0 answers
  1. Cesar
    Cesar avatar
    20 posts
    Member since:
    Oct 2012

    Posted 11 Feb 2014 Link to this post

    Hi i have a problem when i assign null to SelectedValue.

    I have pictures in each of the control elements and when changing the value works perfectly. If you do not select anything right also works. The problem is when after having selected a value image, try to allocate a null control and I changed the text but the image remains.

    I have tried:
    this.DropDownList.SelectedItem = null;

    and:
    this.DropDownList.SelectedValue = null;

    And not working properly.

    Thanks, Regards.
  2. Cesar
    Cesar avatar
    20 posts
    Member since:
    Oct 2012

    Posted 11 Feb 2014 in reply to Cesar Link to this post

    PS: I do not want to show any images
  3. UI for WinForms is Visual Studio 2017 Ready
  4. George
    Admin
    George avatar
    500 posts

    Posted 14 Feb 2014 Link to this post

    Hello Cesar,

    Thank you for contacting us.

    I was not able to reproduce the described problem. Please, refer to the attached project to see what I tried. Try to reproduce the problem in a sample project and send it back or provide me with more detailed steps for reproduce the problem. 

    Looking forward to your reply.

    Regards,
    George
    Telerik

    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

  5. Cesar
    Cesar avatar
    20 posts
    Member since:
    Oct 2012

    Posted 17 Feb 2014 Link to this post

    I Attach a proyect very simple.

    https://www.dropbox.com/s/bxw4c2gf5xc0bg1/ImageList.zip

    A DropDownList with images and marks when the option "Delete Selection" the image is in the DropDownList

    Thanks; Regards
  6. George
    Admin
    George avatar
    500 posts

    Posted 20 Feb 2014 Link to this post

    Hi Cesar,

    Thank you for replying with the sample project.

    I was able to see the issue. I have logged it in our Feedback Portal. You can find it at http://feedback.telerik.com/Project/154/Feedback/Details/119966-fix-raddropdownlist-setting-selecteditem-to-null-when-the-item-has-an-image-le. As a workaround you can use this code:
    this.radDropDownList.SelectedItem = null;
    this.radDropDownList.DropDownListElement.EditableElement.Image = null;

    I have also updated your Telerik Points for reporting this.

    Let me know if you have further questions.

    Regards,
    George
    Telerik
Back to Top
UI for WinForms is Visual Studio 2017 Ready