Showing posts with label drop. Show all posts
Showing posts with label drop. Show all posts

Wednesday, March 28, 2012

control extender for drag and drop - help

I am trying to get drag and drop to work with data dynamically populated from a database. The basic structure layout of the page is based on the work done by Garbin at:

http://aspadvice.com/blogs/garbin/archive/2006/01/17/14730.aspx

I have a master page and some user controls to populate different areas of the page. One of the user controls gets the data from the database and then creates the HTML of the form:

<div id="content1" class="item"> <div id="content1Handle" class="itemHandle">Content 1</div> <div class="itemContent"> <asp:Login ID="myLogin" runat="server" CssClass="centered"></asp:Login> </div> </div> <div id="content2" class="item"> <div id="content2Handle" class="itemHandle">Content 2</div> <div class="itemContent"> <asp:TextBox ID="myTextBox" runat="server"></asp:TextBox> <asp:Button ID="myButton" runat="server" Text="ClickMe" /> </div> </div>

This works OK, but to create the drag and drop behavior, I need to add the following after the end of the </form> tag …

</form> <script type="text/xml-script"> <page> <components><!-- Left Area --> <control id="leftArea"> <behaviors> <dragDropList dataType="HTML" acceptedDataTypes="'HTML'" dragMode="Move" direction="Vertical"> <dropCueTemplate> <template layoutElement="dropCueTemplate" /> </dropCueTemplate> <emptyTemplate> <template layoutElement="emptyTemplate" /> </emptyTemplate> </dragDropList> </behaviors> </control><!-- Right Area --> <control id="rightArea"> <behaviors>

BUT, I do not know how … it has been suggested that I use a control extender, but having viewed the ATLAS vids on the MS website, I cannot understand how a control extender will be able to dynamically create this code after the </form> tag ?

Any ideas anyone ?

Thanks

anyone ? please ... Crying

control cannot be created because visual studio cannot find the controls type in the contr

Just installed Ajax extensions and ajax control toolkit for Vs2005.All fine.

I can drag drop update panel or script manager.

But if I do so with ajax toolkit controls I get a a error as : "control cannot be created because visual studio cannot find the control's type in the control assembly".

I have downloaded and worked with the toolkit at my home comp and it works all fine. But here at my work its giving me this problem.

I googled up to see any solutions but dint find much help!!

So any help with this would be appreciated!! Thanks!!


Hey guys!!

Anyone for the solution??


Did you remember to register it in the GAC? On your work PC, it may not have done that automagically.


Hey thanks for that.

It did work out.

Strange I have added toolkit on couple of PC's and never saw this error.

Just added the Dll to Gac and the problem is solved on my box.

Thanks.

Saturday, March 24, 2012

Confirmation message on ReorderList

Using the ReorderList's drag and drop capability is awesome. However, is there to prompt for a confirmation message box before the drop?

What are the possible values for the "OnItemReorder" event? Is this the right event to call?

thanks!

On ItemReorder will fire on the server, so it's too late to put up a confirmation message.

To enable this sort of behavior, you'll need to make modifications to DropWatcherBehavior.js in the toolkit source.

This simplest way is to modify the drop method in DropWatcherBehavior. To make it more sophisticated, maybe add a property to DropWatcherBehavior that lets you specify text here, and then only do the confirm if the text is present, etc.

this.drop = function(dragMode, dataType, data) {if (window.confirm("DropHere?")) { _dragDropList.drop(dragMode, dataType, data);this.doPostBack(data.id); } }

When I make this change, do I have to rebuild the .dll file for this control? any advice?
Yes you'll need to rebuild the AtlasControlToolkit.dll to incorporate the JS change.

sburke,

I finally gotten to make this change. Now, I have a problem. WHen I hit Cancel on the confirmation message, it doesn't put the order list back to its original order. It just freeze there with the drag outline box on the screen. How would I make this change to restore it to its original state?

thanks!

Conditional xml-script

I working with Beta 2 and CTP for November, I'd like to make a drop down that when it changes if the value isn't US then it changes a label to be Province instead of the default state. Can someone please help me?OK, so this post has been open for several days, is there seriously no one in this community who can tell me how to get xml-script working with a simple example? All I want to be able to do is use xml-script to bind two controls together so that if the country drop-down is changed to something besides country it changes the text property of a label or the innerhtml of a div to province instead of state. I didn't think this one would sit so long with no reply... Am I just missing the tutorial or quickstart where this is explained? Thanks for any help you can offer.

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.

Complete window! drag and drop + collapse + close + resize

Hey Guys and Girls

Has anyone made a panel in ATLAS which can be drag n dropped, closed, collapse and resized.. I know that these functions exist separately. However is it possible to combine them all for one panel? so it acts like typical OS window? would love to hear anyone elses experiences before embarking on trying it myself

thanks

Jonas

I think you can develop a custom web-templated-control with relative ease if you're used to develop in this "branch" of .Net coding environment.

I developed myself a control of this type (draggable/collapsible) with customizable (templated) zones.
If you need it, I'll post some code as soon as I'll get back home from office...