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

Image in null SelectedValue

4 Answers 75 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Cesar
Top achievements
Rank 1
Cesar asked on 11 Feb 2014, 11:44 AM
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.

4 Answers, 1 is accepted

Sort by
0
Cesar
Top achievements
Rank 1
answered on 11 Feb 2014, 12:06 PM
PS: I do not want to show any images
0
George
Telerik team
answered on 14 Feb 2014, 09:02 AM
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).

0
Cesar
Top achievements
Rank 1
answered on 17 Feb 2014, 05:04 PM
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
0
George
Telerik team
answered on 20 Feb 2014, 01:58 PM
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
Tags
DropDownList
Asked by
Cesar
Top achievements
Rank 1
Answers by
Cesar
Top achievements
Rank 1
George
Telerik team
Share this question
or