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

RadBrowseEditor not updating image on ValueChanged event

2 Answers 66 Views
BrowseEditor
This is a migrated thread and some comments may be shown as answers.
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Gone2TheDogs asked on 19 Sep 2017, 06:18 PM

After the user selects an image file from the browse editor, I'd like to display it in a button, much like the example in the Telerik documentation. I've tried different calls to the button's methods including: Update, Refresh, and Invalidate. Nothing has worked. What am I missing?

 

1.Private Sub radLogoFile_ValueChanged(sender As Object, e As EventArgs) Handles radLogoFile.ValueChanged
2.    btnLogoImage.Image = System.Drawing.Image.FromFile(radLogoFile.Value)
3.    btnLogoImage.Update() 'Invalidate 'Refresh
4.End Sub

2 Answers, 1 is accepted

Sort by
0
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
answered on 19 Sep 2017, 06:42 PM

I see no way to remove your own posts, so not to waste anyone's time, but I the issue was with Visual Studio and not the code. In the end, I didn't need to refresh the control (one of my desperate attempts to get it to work).

I actually only needed one line of code in the validating event to set the button's image to the browseEditor's value (line 2 from the main post): btnLogoImage.Image = System.Drawing.Image.FromFile(radLogoFile.Value)

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Sep 2017, 10:37 AM
Hello, Bob, 

Thank you for writing.  

I am glad that the problem you were facing is now resolved. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
BrowseEditor
Asked by
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Answers by
Gone2TheDogs
Top achievements
Rank 1
Iron
Veteran
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or