DropThings as a Web User Control Can't Drag & Drop

Sep 8, 2008 at 10:50 PM
Edited Sep 15, 2008 at 10:45 PM

I have converted DropThings into a web user control for use with a popular web portal framework.

I am having a bear of a time getting the drag & drop functionality to work as described in section 3.2 of the book.

I have put debugger statements throughout the CustomDragDropBehavior.js script to no avail, I am pretty certain that the _initializeDraggableItems method never gets executed. I have also copied all of the theme styles into the various constuent controls (where possible) from the default theme included with DropThings.

Anyone have any suggestions on how to get this functionality working and what may be preventing it from firing?

-Kenneth S Courtney
Tampa, FL
Sep 11, 2008 at 3:24 PM

More Detail:
I have an assembly called CustomDragDrop which provides drag drop functionality to css classes allowing movement of panels... borrowed from the DropThings framework... in any event ... the same assembly WORKS when referenced and run by DropThings, but when referenced and run by DropThings as a module (virtually identical code) there is a call in ExtenderControl base.render (in the render event) which fires in the DropThings web application project but not in my custom module project... same code is executing !

Sep 17, 2008 at 9:01 PM
Edited Sep 17, 2008 at 10:21 PM
I eventually resolved this... as it turns out the point in the page life cycle (Page_Render) where the control is loaded it is not yet in the 'control tree'.

The register client scripts code checks to see if the control is loaded into the page's control tree and if it isn't won't register the client script initialization stuff...

The work around I found was to manually create a new instance of the Script Manager class and manually call "RegisterScriptDescriptors" in WidgetPanels.ascx.cs:


protected void Page_PreRender(object sender, EventArgs e)
    Page page = Page;
ScriptManager _scriptManager = System.Web.UI.ScriptManager.GetCurrent(page);
this.CustomDragDropExtender1, this.LeftPanel);
this.CustomDragDropExtender2, this.MiddlePanel);
this.CustomDragDropExtender3, this.RightPanel);

Finished conversion here: http://host.aciasoftware.com/Home/MyPage/tabid/142/Default.aspx


Oct 15, 2008 at 12:43 PM
For some reason, DropThings works great in either Mozilla Firefox or Opera, but MSIE 7 is hosed. Widgets are moveable, but they can only be moved down and not up. I am still clueless why.