Intersoft Support Center

Integrate Drag-and-Drop to WebDragDropExtender

This walkthrough shows you how to enable WebTreeView to accept data items from WebGrid control.

During this walkthrough, you will learn how to do the following:

  • Use AccessDataSource.
  • Bind WebTreeView.
  • Use DragDropExtender to set the Drag control and Drop control.
  • Set the TreeView to accept data from other control

 Prerequisites

In order to complete this walkthrough, you will need the following:

  • Access to the Microsoft Access Northwind database.
  • Visual Studio 2005/2008/2010 Application.

 Step-By-Step Instructions

To enable WebTreeView to accept data items from WebGrid control

  1. Launch Visual Studio.NET 2008.
  2. Click on File menu, then select New and click Web Site.
  3. Select ASP.NET Web Site in the Template box and set Location to HTTP.
  4. Named the Web Site and click OK.
  5. Right-click on Project's name and select Add New Item.
  6. Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
  7. Drag WebGrid instance from ToolBar to WebForm.
  8. Bind WebGrid to AccessDataSource control.
  9. Drag WebTreeView instance from ToolBar to WebForm.
  10. Bind WebTreeView to XmlDataSource.
  11. Click the WebTreeView instance and press F4 to open its Properties window.
  12. Set AllowDragDrop to True and AllowDropFromOtherControls to True.
  13. Expand DragDropSettings and set the following properties.
    Property Value
    AllowChildDrop True
    AllowLeafDrop True
    AllowRootDrop True
    AllowSiblingDrop True

  14. Drag WebDragDropExtender from ToolBar to WebForm.
  15. Right click on WebDragDropExtender control and choose Properties.
  16. On DragControls property, click the (collection) button to open WebDragControl Collection Editor.



  17. Set ControlID to WebGrid1 and Effect to Copy.
  18. Click the (collection) button on AdvancedProperties and a dialog box will appear afterwards.
  19. Select Enable special integration with Intersoft control and Allow dragging on checked rows. Click OK to apply the settings.



  20. On DropControls property, click the (collection) button to open WebDropControl Collection Editor. Set ControlID to WebTreeView1.



  21. Run the project.

Previous Next