The tree nodes are highlighting now. I would appreciate it if you could answer some questions so I understand what is happening. My code is below for reference. I am reading XML files and creating a tree and filling an objecteditpanel with the properties.
1) The tree that I am getting is the Default Control Theme. What if I want the Telerik Theme with nodes that highlight. What would I need to do?
2) I added the override but I am not clear on what is being returned. What is " fullname "?
3) I added BeginInit() and EndInit() and nothing changed. Is it in the correct place? Do I need it? Should I delete BeginInit() and EndInit() ? See my code below.
4) There are several lines of commented code. When I could not get the tree to highlight with the Theme, I put a border around the selected node and saved the level and index. When the next node was selected I put a border around it and tried to remove the border from the previous node by using the level and index of the prior node and changing the border to transparent. I kept getting an error regarding the indexes being outside or negative. However they were exactly what they should have been when I went through the code with breakpoints. I would like to know what I could have done to make it work this way. When I can't get something to work, I try another way. Of course, I won't use this method now that your suggestions have worked but I still want to know what was wrong with the code, if possible.
5) FYI: The RadCustomButtonTestVB file converted with 10 errors so I was not able to look at it.
Public Class Tree
Public Overrides Property ThemeClassName() As String
Set(ByVal value As String)
Private hRecord As NVEAData.Record
Private hObjectEditPanel As ObjectEditPanel
Private vPanel As String = "False"
Private vRecord As String = "False"
Private vNodeSelected As String = "False"
Public Property Record() As NVEAData.Record
'Public vPreviousNodeLevel As Integer = 0
'Public vPreviousNodeIndex As Integer = 0
Set(ByVal value As NVEAData.Record)
hRecord = value
If IsNothing(hRecord) Then
Nodes.Clear() 'clears tree - otherwise another tree is concatenated to previous tree
Dim Node1 As New RadTreeNode(hRecord.Name) 'Declare Top Node on Tree
Nodes.Add(Node1) 'Add Top Node on Tree
WriteRecordNodes(Node1, hRecord) 'Loads all nodes below the top node
Node1.ExpandAll() 'Expands the entire tree below the top node
LoadRecordIntoEditPanel() 'Load Edit Panel with Top Node
Public Property ObjectEditPanel() As ObjectEditPanel
Set(ByVal value As ObjectEditPanel)
hObjectEditPanel = value
If IsNothing(hObjectEditPanel) Then
vPanel = "True"
Public Sub WriteRecordNodes(ByVal Node As RadTreeNode, ByVal hrecord As Record)
Node.Text = hrecord.Name
Node.Tag = hrecord
For Each c As iRecordCollection In hrecord.Collections
For Each r As Record In c
Dim vnode As New RadTreeNode
Public Sub LoadRecordIntoEditPanel()
If vRecord = "True" And vPanel = "True" Then
If vNodeSelected = "True" Then
ObjectEditPanel.Record = CType(SelectedNode.Tag, Record)
'Nodes(vPreviousNodeLevel).Nodes(vPreviousNodeIndex).BorderColor = System.Drawing.Color.Transparent
'SelectedNode.BorderColor = System.Drawing.SystemColors.ActiveBorder
'vPreviousNodeLevel = SelectedNode.Level
'vPreviousNodeIndex = SelectedNode.Index
'MessageBox.Show(vPreviousNodeLevel.ToString & "," & vPreviousNodeIndex.ToString)
ObjectEditPanel.Record = hRecord