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 WithThank you in advance.
Simon
It seems I was missing the .EvaluateAlgorithm() in order to refresh the data. It now works with this in there.
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.