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

Finding CheckedNodes on NodeDrop

3 Answers 49 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
PHANI
Top achievements
Rank 1
PHANI asked on 06 Oct 2012, 04:12 PM

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?

 

3 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 08 Oct 2012, 03:44 PM
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.
0
PHANI
Top achievements
Rank 1
answered on 08 Oct 2012, 04:09 PM
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.
0
Nencho
Telerik team
answered on 09 Oct 2012, 06:15 AM
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.
Tags
TreeView
Asked by
PHANI
Top achievements
Rank 1
Answers by
Nencho
Telerik team
PHANI
Top achievements
Rank 1
Share this question
or