RadControls for WinForms Q1 2009 SP1
MS Visual Studio 2008
I have been able to do just about everything else I need to do in the Treeview control, except capturing click events in my form. The tree is generated from SQL tables and otherwise appears fine. Ultimately I am hoping to wire the tree nodes to files in the filesystem.
Following is the code to capture the DoubleClick event (copied from documentation):
Sub RadTreeView1_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)
Dim args As MouseEventArgs = TryCast(e, MouseEventArgs)
Dim clickedNode As RadTreeNode = RadTreeView1.GetNodeAt(args.X, args.Y)
If clickedNode <> Nothing Then
MessageBox.Show("Node Text: " + clickedNode.Text + " Node Value: " + clickedNode.Tag)
The only other block of code in my form is my form load which loads the tree with data from the database.
I have 2 questions/problems:
1. Visual Studio is complaining about the IF statement: "Operator '<>' is not defined for types 'Telerik.WinControls.UI.RadTreeNode' and 'Telerik.WinControls.UI.RadTreeNode'. What does this mean?
2. It appears the DoubleClick event isn't being captured since nothing happens when I double click a node. Is the IF statement error related to this? What am I missing? For my testing I simply commented out the 'If...' and 'End If' lines.
Thanks in advance for any guidance you can provide.