When I try to use the FindNodeByValue Method, I get an error stating "Operator '=' is not defined for types 'Telerik.Web.UI.RadTreeNode' and 'Telerik.Web.UI.RadTreeNode'".
I have looked at the examples for "Finding Nodes at Runtime" and "Turorial: Finding Nodes"...from what I am reading, this should work.
What am I doing wrong?
Public
Sub LoadAttendeesTreeView(ByVal p_iSchdID As Integer)
Try
' Create DataSet & DataTables
Dim ds As New DataSet
Dim dtDepartment As DataTable = TrainingData.GetDepartments
Dim dtEmployees As DataTable = TrainingData.GetAttendees(p_iSchdID)
Dim curDept As Integer = 0
' Add the DataTables to the DataSet
ds.Tables.Add(dtDepartment)
ds.Tables.Add(dtEmployees)
' Create the data relationship
ds.Relations.Add("RelDepartment", ds.Tables(0).Columns("DEPARTMENT"), ds.Tables(1).Columns("eca_emply_dpt_id"))
For Each deptRow As DataRow In ds.Tables(0).Rows
curDept =CType(deptRow("DEPARTMENT").ToString, Integer)
Dim deptTESTNode As RadTreeNode = Me.tvAttendees.FindNodeByValue(curDept.ToString())
' GETTING ERROR ON LINE BELOW...
If deptTESTNode = Nothing Then
' Create a root node for the department
Dim deptNode As RadTreeNode = New RadTreeNode(deptRow("DEPT_NAME").ToString(), deptRow("DEPARTMENT").ToString())
' Add the node to the Tree View Control
tvAttendees.Nodes.Add(deptNode)
End If
Next
tvAttendees.DataBind()
Catch ex As Exception
Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "General Exception")
End Try
End Sub