Finding CheckedNodes on NodeDrop

4 posts, 0 answers
  1. PHANI
    PHANI avatar
    3 posts
    Member since:
    Oct 2012

    Posted 06 Oct 2012 Link to this post

    I have a 2 treeviews lets say tree1 and tree2.
    tree1 has checkbox nodes
    I drag and drop the checked nodes from tree1 to tree2.
    On tree1_nodedrop, trying to read those checkednodes using Tree1.CheckedNodes() and it is always returning 0.
    Earlier it used to work, i'm not sure whether is stop working after SP1 installation or VS2012 installation.

    Telerik Current Version: 2012.2.724.40 (2012 Q2 SP1)
    Code Editor: Visual Studio 2010
    Framework: 4.0
    Tree1 ASPX  Code:
    <telerik:RadTreeView ID="tree1" runat="server" Skin="Windows7" DataFieldID="ID"

     

     

     

     

    DataFieldParentID="ParentID" DataTextField="NodeText" EnableDragAndDrop="true"

     

     

     

     

    CheckBoxes="true" CheckChildNodes="true" DataValueField="ValueID">

    Code Behind:
    Private Sub tree1_NodeDrop(sender As Object, e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs) Handles tree1.NodeDrop
    For Each node As RadTreeNode In tree1.CheckedNodes
    // do something

     

     

     

    Next

     

     

     

    End Sub

    What am i missing here?

     

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 08 Oct 2012 Link to this post

    Hi Phani,

    I have performed some tests and it works as expected at my end. In addition, I have recorded a video, demonstrating the behavior at my end. Please let me know if I am missing something.

    Regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. PHANI
    PHANI avatar
    3 posts
    Member since:
    Oct 2012

    Posted 08 Oct 2012 Link to this post

    Its my bad. I'm using this in a user control and the IsPostback check is commented somehow, hence it is binding again on every postback. Never mind, thanks for your help.
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 09 Oct 2012 Link to this post

    Hello Phani,

    Thank you for getting back to us.

    I am glad to hear that you solved the problem yourself. Please, do not hesitate to contact us again if you have further questions.


    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top