preslavrachev
04-23-2009, 10:22 AM
Suppose, I am having a list of meetings stored in a DB table. Then, with the use of a Remote Object, I extract them and store them into an ArrayCollection. So far, that's fine.
Now. Some of the meetings are actually "parent" meetings - they have as children, some of the other meetings. A parent meeting has an array called children, where it stores references to its sub-meetings.
Now to the point: when I feed this arrayCollection into a Tree control, instead of showing it this way:
Parent Meeting1
--Child Meeting1
--Child Meeting2
it actually shows it in this way:
Parent Meeting1
--Child Meeting1
--Child Meeting2
ChildMeeting1
ChildMeeting2
I guess I need some kind of an adaptor, that would "cut out" the meetings that appear to be children in the collection, but I am still not entirely sure. Please, suggest a proper way.
Best,
Preslav
Now. Some of the meetings are actually "parent" meetings - they have as children, some of the other meetings. A parent meeting has an array called children, where it stores references to its sub-meetings.
Now to the point: when I feed this arrayCollection into a Tree control, instead of showing it this way:
Parent Meeting1
--Child Meeting1
--Child Meeting2
it actually shows it in this way:
Parent Meeting1
--Child Meeting1
--Child Meeting2
ChildMeeting1
ChildMeeting2
I guess I need some kind of an adaptor, that would "cut out" the meetings that appear to be children in the collection, but I am still not entirely sure. Please, suggest a proper way.
Best,
Preslav