Empty RadTreeNodeDragDropEventArgs on NodeDrop

3 posts, 0 answers
  1. contentXXL
    contentXXL avatar
    16 posts
    Member since:
    Apr 2007

    Posted 05 Aug 2009 Link to this post

    Hello,

    I got a problem with Drag&Drop of a TreeNode. In a simple web project this false behaviour doesn't appear. But in my bigger project I have the following problem:

    I got on an aspx site a simple TreeView control...

    1     <form runat="server" id="telerik" > 
    2       
    3         <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
    4                  
    5         <div> 
    6             <telerik:RadTreeView ID="myTreeView" runat="server" EnableDragAndDrop="True" 
    7                 EnableDragAndDropBetweenNodes="true" OnNodeDrop="myTreeView_NodeDrop">  
    8             </telerik:RadTreeView> 
    9         </div>                  
    10           
    11         <asp:LinkButton ID="newpagelink" Text="" OnClick="AddTab_Click" class="normal" runat="server" /> 
    12     </form> 
    13  

    My code behind looks like this...
    1 ...      
    2  
    3 Protected Sub myTreeView_NodeDrop(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs)  
    4         Dim sourceNode As RadTreeNode = e.SourceDragNode  
    5         Dim destNode As RadTreeNode = e.DestDragNode  
    6         Dim dropPosition As RadTreeViewDropPosition = e.DropPosition  
    7  
    8         If destNode IsNot Nothing Then 
    9             If sourceNode.TreeView.SelectedNodes.Count <= 1 Then 
    10                 PerformDragAndDrop(dropPosition, sourceNode, destNode)  
    11             ElseIf sourceNode.TreeView.SelectedNodes.Count > 1 Then 
    12                 For Each node As RadTreeNode In sourceNode.TreeView.SelectedNodes  
    13                     PerformDragAndDrop(dropPosition, node, destNode)  
    14                 Next 
    15             End If 
    16  
    17             destNode.Expanded = True 
    18             sourceNode.TreeView.ClearSelectedNodes()  
    19         End If 
    20     End Sub 
    21       
    22 ...  
    23       

    If i'm debugging into this event everytime the RadTreeNodeDragDropEventArgs are empty, that means, the e.SourceDragNode and the e.DestDragNode are nothing!

    Does anybody has a solution for me or an idee how this can be?!

    Thanks for help!!!

    Best regards from Germany,
    Steven***
  2. contentXXL
    contentXXL avatar
    16 posts
    Member since:
    Apr 2007

    Posted 05 Aug 2009 Link to this post

    Note: I'm using 2009 Q2 version...
  3. contentXXL
    contentXXL avatar
    16 posts
    Member since:
    Apr 2007

    Posted 05 Aug 2009 Link to this post

    Problem is solved: I got

    EnableViewState

     

    ="false"...

    It has to be TRUE!!!!

     

Back to Top