WebForms: Detecting a GoPalette Drag?

Hello,

We are in the process of converting a WinForms GoDiagram project into a WebForms style project. I’ve been extremely impressed with how easy this has been.

We understand the drag and drop limitations, but were hoping to use some of the functionality that we’ve seen in the examples between GoPalettes and GoViews. What we’d like to do is detect when a drag occurs from a GoPalette to a GoView and populate a seperate persistant model ( XML file, database, etc. ). From what I can tell, the ordering looks like:

GoView.RaisePostBackEvent
GoDocument.AddCopy
GoDocument.CopyFromCollection

Would doing something like overriding CopyFromCollection and sending out an event be a reasonable approach? I think that would work, but I wanted to check in case I was missing something obvious. Thanks!

It’s true that the GoView.ExternalObjectsDropped event doesn’t exist in WebForms, because we didn’t want to try to reimplement a lot of the .NET WinForms/Windows drag-and-drop support for GoDiagram Web.

But GoDiagram’s SelectionDropReject/SelectionDropped mechanisms work in both WinForms and WebForms.

So you can define one or more GoView event handlers for that (Background… and/or Object…), and/or you can override GoObject.OnSelectionDropReject or GoObject.OnSelectionDropped.

Walter,

Thanks! That is much simpler. I had looked at those events earlier but had thought they wouldn’t work because the selection belonged (I thought?) to the palette and the GoObject was directly copied into the view’s document. This looks like it should work, though. Thanks again!