3 Answers, 1 is accepted
0
Accepted
Hello Samantha,
Thank you for your contacting Telerik Support.
In order to achieve drag and drop functionality of RadBrowseEditor, please, have a look at the following code snippet:
Please, find the attached video (drag and drop over the browser to play), demonstrating the implemented behaviour.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for your contacting Telerik Support.
In order to achieve drag and drop functionality of RadBrowseEditor, please, have a look at the following code snippet:
public partial class Form1 : Form{ string draggedFileName = string.Empty; public Form1() { InitializeComponent(); this.radBrowseEditor1.AllowDrop = true; this.radBrowseEditor1.DragEnter += radBrowseEditor1_DragEnter; this.radBrowseEditor1.DragDrop+=radBrowseEditor1_DragDrop; } private void radBrowseEditor1_DragDrop(object sender, DragEventArgs e) { if (e.Effect== DragDropEffects.Move) { this.radBrowseEditor1.Value = draggedFileName; e.Effect = DragDropEffects.None; } } private void radBrowseEditor1_DragEnter(object sender, DragEventArgs e) { Array data = ((IDataObject)e.Data).GetData("FileName") as Array; if (data != null) { if ((data.Length == 1) && (data.GetValue(0) is String)) { string filename = ((string[])data)[0]; string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); string ext = Path.GetExtension(filename).ToLower(); if ((ext == ".doc") || (ext == ".docx")) // here you can restrict allowed files for drag & drop operation { e.Effect = DragDropEffects.Move; draggedFileName = files[0]; } } } }}Please, find the attached video (drag and drop over the browser to play), demonstrating the implemented behaviour.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Samantha
Top achievements
Rank 1
answered on 19 Sep 2013, 01:32 PM
It works like a dream - thank you kindly!
0
Hello Samantha,
I am glad that the issue you were facing is now resolved. Please do not hesitate to contact us if you have any additional questions.
It was pleasure for me to assist you.
Regards,
Desislava
Telerik
I am glad that the issue you were facing is now resolved. Please do not hesitate to contact us if you have any additional questions.
It was pleasure for me to assist you.
Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
