[Solved] Adding Data clears the Tree

1 Answer 12 Views
TreeMap
Simon
Top achievements
Rank 1
Iron
Simon asked on 14 Apr 2026, 10:29 AM

If I have to dynamically add data to the Treemap, I'm usually clearing the items at the start of this process. Then, when I add new items in the tree map remains totally clear on the 2nd time data is loaded. The first time is fine.

I've been looking for a Refresh method but this does not assist at all.

My current codes goes something like...

With Me.treList
    .Items.Clear()

    If rec.RecordCount > 0 Then
        Do Until rec.EOF
            .Items.Add(rec("Department").ToString, CDbl(rec("TotalDepartmentStock")))
            rec.movenext
        Loop
    End If

    .Refresh()
End With

Thank you in advance.

Simon

Simon
Top achievements
Rank 1
Iron
commented on 14 Apr 2026, 11:34 AM

It seems I was missing the .EvaluateAlgorithm() in order to refresh the data. It now works with this in there.
Dinko | Tech Support Engineer
Telerik team
commented on 15 Apr 2026, 06:43 AM

I am happy to hear that you were able to find a solution for your scenario. If you have any other questions, feel free to contact us again.

1 Answer, 1 is accepted

Sort by
0
Accepted
Simon
Top achievements
Rank 1
Iron
answered on 15 Apr 2026, 06:55 AM
The fix for this is to use the .EvaluateAlgorithm method.
Tags
TreeMap
Asked by
Simon
Top achievements
Rank 1
Iron
Answers by
Simon
Top achievements
Rank 1
Iron
Share this question
or