Cancel Drap & Drop in RadFileExplorer

8 posts, 0 answers
  1. CSharp
    CSharp avatar
    4 posts
    Member since:
    Nov 2007

    Posted 31 Dec 2009 Link to this post

    how can i Cancel Drap & Drop in RadFileExplorer?
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 31 Dec 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSharp
    CSharp avatar
    4 posts
    Member since:
    Nov 2007

    Posted 02 Jan 2010 Link to this post

    i set this two properties, but still can drag 7 drop folders!!!!!!!!!!!!
  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 06 Jan 2010 Link to this post

    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.
  6. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 10 Oct in reply to Fiko Link to this post

    Hi Fiko,

     

    It appears that this is not working (anymore)?

    Are there new options to achieve this?

     

    Marc

  7. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 12 Oct Link to this post

    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.
  8. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 13 Oct in reply to Vessy Link to this post

    Thanks Vessy this works
  9. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 13 Oct Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017