This is a migrated thread and some comments may be shown as answers.

Cancel Drap & Drop in RadFileExplorer

7 Answers 121 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
CSharp
Top achievements
Rank 1
CSharp asked on 31 Dec 2009, 08:44 AM
how can i Cancel Drap & Drop in RadFileExplorer?

7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 31 Dec 2009, 08:58 AM
Hello CSharp,

In order to disable the drag&drop features of the file explorer controls you  need to set a couple of properties from your page code file (e.g. in the Page_Load() method):

RadFileExplorer1.TreeView.EnableDragAndDrop = false; 
RadFileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = false; 

The first property disables drag&drop for the tree nodes, while the second disables dragging of the grid rows.


Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
CSharp
Top achievements
Rank 1
answered on 02 Jan 2010, 07:13 AM
i set this two properties, but still can drag 7 drop folders!!!!!!!!!!!!
0
Fiko
Telerik team
answered on 06 Jan 2010, 11:31 AM
Hi CSharp,

In your case you need to use client side approach in order to achieve the desired result. Could you please follow these steps and you will be able to cancel the OnClientMove event in RadFileExplorer:
  1. Attach a handler to RaFileExplorer's OnClientMove event
  2. Implement the handler as follows:

    function OnExplorerMoveHandler(oExplorer, args)
    {
        args.set_cancel(true);
    }

    This will cancel drag and drop in the Grid
  3. In order to cancel the draganddrop for the TreeView you need to attach a handler to the OnClientNodeEditing event of the TreeVIew:
    protected void Page_Load(object sender, EventArgs e)
    {
        RadFileExplorer1.TreeView.OnClientNodeEditing = "treeNodeEditing";
    }
  4. Implement the handler as follows:
    function treeNodeEditing(oTree, args)
    {
      args.set_cancel(true);
    }

I hope this helps.

Sincerely yours,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 10 Oct 2016, 01:34 PM

Hi Fiko,

 

It appears that this is not working (anymore)?

Are there new options to achieve this?

 

Marc

0
Vessy
Telerik team
answered on 12 Oct 2016, 02:44 PM
Hi Marc,

In order to disable fully the drag and drop functionality of FileExplorer by applying the following configurations to the control (note that they have to be set in the Page_PreRenderComplete event handler):
private void Page_PreRenderComplete(object sender, EventArgs e)
{
    RadFileExplorer1.TreeView.EnableDragAndDrop = false;
    RadFileExplorer1.Grid.ClientSettings.AllowRowsDragDrop = false;
    RadFileExplorer1.ListView.ClientSettings.AllowItemsDragDrop = false;
}


Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 13 Oct 2016, 07:14 AM
Thanks Vessy this works
0
Vessy
Telerik team
answered on 13 Oct 2016, 11:13 AM
Hi,

You are welcome, Marc. Let us know should any further question on this matter occurs.

Regards,
Vessy
Telerik by Progress
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
FileExplorer
Asked by
CSharp
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
CSharp
Top achievements
Rank 1
Fiko
Telerik team
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Vessy
Telerik team
Share this question
or