Hi I have a Type(ID,ParentID, etc) and I need a list of items sorted like a tree, i.e.
Dim TreeList as List
TreeList.add(1,0)
TreeList.add(2,1)
TreeList.add(3,1)
treelist.add(4,3)
treelist.add(5,4)
treelist.add(6,3)
treelist.add(7,0)
treelist.add(8,7)
etc.
that's about how it should look after it's resorted...
Note I personally have my data pre-sorted in my SQL script but I'd like to make my tool reusable by other b4a members so that in case their data isn't pre-sorted correctly then at least my tool will sort it correctly.
Dim TreeList as List
TreeList.add(1,0)
TreeList.add(2,1)
TreeList.add(3,1)
treelist.add(4,3)
treelist.add(5,4)
treelist.add(6,3)
treelist.add(7,0)
treelist.add(8,7)
etc.
that's about how it should look after it's resorted...
Note I personally have my data pre-sorted in my SQL script but I'd like to make my tool reusable by other b4a members so that in case their data isn't pre-sorted correctly then at least my tool will sort it correctly.
Last edited: