Wednesday, March 21, 2012

Composite control with updatepanel for drag and drop

I'm trying to create a composite control with an updatepanel on it that contains an area with dropzones and draggables.

I have created the following controls:

- DragDropUpdatePanel (the control with the UpdatePanel on it)

- UpdatePanelTemplate (the contenttemplate for the updatepanel)
- contains a placeholder for the dropzones and a linkbutton to force an update

- Dropzone that implements IScriptControl

- Draggable that implements IScriptControl

- Loader, an example from another thread to update the updatepanel after a postback.


The DragDropUpdatePanel will create all dropzones and draggables in the DataBind function. This all works ok until i drop a draggable on a dropzone.
Ondrop is performing the click event of the linkbutton that will execute the DataBind method and refreshes the Updatepanel.

The result looks ok but the dropzone is always disposed and i get an and error when i try to move a draggable item.

I have created a demo that you candownload here.

Hopefully someone can explain to me what I am doing wrong.

Thanks Willem.

struggeling with it but still no result ... could someone help me out here?

thanks


got it fixed ..Big Smile .. wrote an extender for the dropzone and based myself on the dropwatcherbehavior.js file from the ReorderList control in the atlascontrol toolkit.

No comments:

Post a Comment