Forum Discussion
RafMarques wrote:The MemberList method works (we use some of them), however, I don't get a Tree style. I wanted to have the same effect as the member.Tree
I forgot to mention, but i'll post it for reference: you can actually get a tree with custom member lists. The key is building the list with MemberInfo objects rather than Member objects; MemberInfo has a property .IndentLevel, which you can explicitly set for each object. It starts at 0, so if you set to 1 for a member, that member will be indented one level; 2 will go one level further; etc etc.
This is actually shown in the Snippet in the screenshot below, but it's a fairly complex one (recurring over the tree, checking for Entity state by period...) so it tends to be overlooked.
Ha! I guess this is what I was looking for. Didn't know we could use Indent here that could affect the result.
So the result of this will be the same as a list of members, but indented in the order I create in the code. It will feel like a "Descendants" style with the members I need, with no expansion (+/-) yeah?
- JackLacava2 years agoHonored Contributor
Yeah. I actually picked this as an idea for a blog post, which should be published in the next couple of weeks.
Related Content
- 3 years ago
- 2 years ago