Does anybody know a way how to get the items of a DataTreeListView in the "tree sort order"?
Sample: Imagine a DataTreeListView has the following data source (KeyAspectName = ID, ParentKeyAspectName = ParentID).
Item A with ParentID 0 has ID 1
- Item D with ParentID 1 + ID 5
- Item E with ParentID 1 + ID 6
Item B with ParentID 0 hast ID 2
- Item C with ParentID 2 + ID 3
- Item D with ParentID 2 + ID 4
I would like to get a list containing the items A, D, E, B, C, D in this sort order; is there already a property which will return this data?
TIA,
Bernhard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear fellow OLV'ers!
Does anybody know a way how to get the items of a DataTreeListView in the "tree sort order"?
Sample: Imagine a DataTreeListView has the following data source (KeyAspectName = ID, ParentKeyAspectName = ParentID).
Item A with ParentID 0 has ID 1
- Item D with ParentID 1 + ID 5
- Item E with ParentID 1 + ID 6
Item B with ParentID 0 hast ID 2
- Item C with ParentID 2 + ID 3
- Item D with ParentID 2 + ID 4
I would like to get a list containing the items A, D, E, B, C, D in this sort order; is there already a property which will return this data?
TIA,
Bernhard
Hi Bernhard,
more or less.
What about calling Select.All and iterating over SelectedObjects?
Something like (VB.Net)
Cheers
Claudia
You could also use
GetNthItemInDisplayOrder()
.This utility method will work with any type of
ObjectListView
, grouped or ungrouped:Very nice, thanks to you both.