Hierarchy Tree Customization

yes I have an asset DB

image

I have a problem in binding all the parameter.
Here's my template:
image
and here's my Template custom properties:
image
I don't know where to bind some of the properties.

I wouldn't worry about depth just yet, and I'm not sure if expanded is needed. It could be handy if you want the window to remember and load the same way it was when it was closed. Parent could be needed by your button script, but probably won't need to be bound to anything, and position would probably only be needed if you want the ability to reorder things.

In any case, I have to break away and get some things done. Here's a guide to how I would go about this:
Step 1: Finish building the template, from your picture it looks like your missing the image that would be needed to match your example
Step 2: Throw a repeater in a window somewhere, and set the template path and template behavior properties
Step 3: Create mock template parameters dataset with several rows that causes templates to appear.
Step 4: Work on the template's custom parameters to get appropriate icons to appear and to get asset names to appear
Step 5: Develop a query to get the relevant asset information, and bind it to a custom dataset property
Step 6: Create an initialization script or query that pulls in all root level data into the template parameters and sets all the root level "+/-" buttons to start out with a "+" Symbol
Step 7: Create a script on the "+/-" button uses the asset name and parent properties from the template parameters to remove or add rows to the template parameter dataset (effectively expanding or collapsing hierarchies
Step 8: Figure out how to do the hierarchical spacing. A transform script that multiplies the zero indexed depth parameter by some arbitrary width would probably be simple enough. I remember from one of your previous questions that you are quite proficient with transforms, but there are other options as well.

Good luck, and I'll check back in on this at the other end of this day to see what you were able to accomplish.

1 Like

okay I will try this. Thanks!

'Step 1: Finish building the template, from your picture it looks like your missing the image that would be needed to match your example'
As for my image on my template I already put it on the image path property. or do i need to put a separate image component?

Well, the image path property is just that: A path.
You need to use this path to display an image.
So you'll have to put an image component into your template, then bind its source to your image path property.

I suggest you go through the inductive university to learn the basics, before attempting to do something like this.
Building a tree from a repeater is not trivial, in the sense that it uses a combination of many different things, some of them a bit tricky. If you're not familiar with these things, putting them all together is going to be a difficult task, and you'll have to get help at every step of the way. Which will quickly become frustrating for those trying to help you.
So get your basics under control, and then use those basics to build more complex stuff - and at this point we'll gladly help you. But we're not here to replace the documentation and university.

1 Like

Is there a compelling reason not to use the tree component for this? Seems like it would be easier.

1 Like

It seems we're all thinking the same thing.
Apparently he want something that's "more dynamic and customizable".
Whether that's compelling enough is up to him I guess.

These are my three best guesses:
...to give the application a custom look and feel?
...because reinventing the wheel is fun?
...the customer won't budge on this point?

@Dan_Kevin_Dagapioso How far did you get on this? Are you hung up on anything? I'm curious to see how this design choice turns out.

Hey justin! Sorry fo the late reply. But here's my work. It's more dynamic and customizable. It's still a little buggy but it's working

1 Like

Hey DAN,

Can you please provide the template/view import file. It will useful for me.