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.
Unfortunately, activation email could not send to your email. Please try again.

GDBG Drag and Drop custom data

Thread ID:

Created:

Updated:

Platform:

Replies:

41602 Mar 6,2006 04:45 PM Mar 8,2006 08:47 AM Windows Forms 4
loading
Tags: GridControl
Fred
Asked On March 6, 2006 04:45 PM

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?

Fred
Replied On March 7, 2006 11:17 AM

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); }

Fred
Replied On March 7, 2006 04:45 PM

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

Administrator [Syncfusion]
Replied On March 7, 2006 11:46 PM

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

Fred
Replied On March 8, 2006 08:47 AM

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!

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;