DropEnabled="false" in treeview xml nodes does not prevent drop.

3 posts, 1 answers
  1. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 11 Aug 2008 Link to this post

    Given the following tree source,  I should not be able to drop on any node except Favorites.  The tree allows drop from any node to another.  What am I doing wrong?

    NOTE:  The tree is Created with 

    m_RadTreeFolderHierarchy.EnableDragAndDrop =

    True


    <?

    xml version="1.0" encoding="utf-8"?>

    <

    Tree>

    <!--

    example tree node <Node Text="" NavigateUrl="" Target="" ImageUrl="http://my.millerjohnson.com/PublishingImages/MJTree/nothing.gif" Expanded="True" Checkable="false"/>-->

    <

    Node Text="Favorites" NavigateUrl="" Target="" ImageUrl="http://my.web.com/PublishingImages/FavStar.gif" Expanded="false" Checkable="false" Tooltip="" DropEnabled="true" >

    </

    Node>

    <

    Node Text="Attorney Desktop" ImageUrl="http://my.web.com/PublishingImages/MJTree/Matters.gif" Expanded="True" Checkable="false" DropEnabled="false" >

    <

    Node Text="My Matters" ImageUrl="http://my.web.com/PublishingImages/MJTree/myDocuments.gif" Expanded="True" Checkable="false" DropEnabled="false" >

    <

    Node ImageUrl="http://my.web.com/PublishingImages/MJTree/kmatter.gif" Text="test (123)" NavigateURL="http://my.web.com/AttyDesk/default.aspx?MPInfo=RNRKClients.123&amp;Selected=Overview" Target="_self" Checkable="false" DropEnabled="false">

    <

    Node ImageUrl="http://my.web.com/PublishingImages/MJTree/ktime.gif" Text="Time for test(123)" NavigateURL="http://timeinfo.com/action/inquiry/p-information?client=123" Target="_blank" Checkable="false" DropEnabled="false"/>

    </

    Node>

    </

    Tree>

  2. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 14 Aug 2008 Link to this post

    Hi Bob,

    Thank you for contacting Telerik support.

    The DropEnabled property is parsed only by RadTreeView "Classic". Since you are using RadTreeView for ASP.NET AJAX, the respective property is AllowDrop.

    Please replace DropEnabled with AllowDrop in the XML file definition.

    Best wishes,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  3. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 14 Aug 2008 Link to this post

    The suggested change changes the drop hover icon to a no drop symbol Ø. 

    My code uses the following to exit out of the drop action:
    if (sourceNode.get_allowDrag()== false) continue; 
    and
     if (destinationNode.get_allowDrop()== false) continue;

    I believe that is correct.  Thanks for your help.
Back to Top