We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GDBG Drag and Drop custom data

Hi, I have a GDBG that is used to list files in a "Filing Cabinet." When a user goes to email files, a drop target pictured as an envelope appears and the user can drag and drop photos out of a list view or the GDBG, which is where my question comes in. How do I set the data that is being dragged. I do not want the tab delimited text - this does me no good. I have an underlying datasource with the byte[] information for the selected file and I want to put that into my own custom object and send it in the DragAndDrop data. I''m looking for something similar to overriding OnItemDrag available in the ListView control whereby I can set the data by doing grid.DoDragDrop(...). How do I do this?

4 Replies

FR Fred March 7, 2006 04:17 PM UTC

This is the ListView code I was refering to. The line to notice is the last one. How do I perform this same sort of function in the grid? I need to effectively override your Drag and Drop operations. protected override void OnItemDrag(ItemDragEventArgs e) { //Put selected photos in memory as evelope items for drag and drop EPS.Libraries.Mailer.Core.Envelope envelope = new EPS.Libraries.Mailer.Core.Envelope(); foreach(ListViewItem lvi in this.SelectedItems) { FilingCabinetService.ThumbnailsDS.ThumbnailsTableRow thumb = lvi.Tag as FilingCabinetService.ThumbnailsDS.ThumbnailsTableRow; EPS.Libraries.Mailer.Core.EnvelopeItem item = envelope.AddEnvelopeItem(ItemType.FilingCabinet, thumb.path, new MemoryStream(thumb.data), Path.GetFileName(thumb.path), new QueryExpandEnvelopeItem(ExpandEnvelopeItem)); } this.DoDragDrop(envelope, DragDropEffects.Move); }


FR Fred March 7, 2006 09:45 PM UTC

I would appreciate some sort of response from you guys- at least an awknowledgement of my post. I don''t mean to be rude, but it''s been 2 days now and as I''m sure you know the success of your customers products depends on the usability of yours. Please give me some sort of insight into this problem. Thanks, Fred


AD Administrator Syncfusion Team March 8, 2006 04:46 AM UTC

Hi Fred, Sorry for the delayed response. Please refer to the forum thread below that has a sample demonstrating the drag and drop operation with the custom data. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17221 http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=18162 Let us know if you need any further information. Thanks, Rajagopal


FR Fred March 8, 2006 01:47 PM UTC

Thank-You! That first forum post was exactly what I was looking for- not sure why it didn''t turn up in any of my searches!

Loader.
Live Chat Icon For mobile
Up arrow icon