I thought a lot about this, searched the internet and the method that I like most is where you keep the lineage in a separate field in your table containing your hierarchical data. I'm not saying it's the best, just that I like it best. I'll explain the method quickly and then ask my question.
You have a table structure like this:
Code: Select all
In the lineage field we keep the lineage of the current item with the id's of it's parents separated by unique separator(ex. 1/=/4/=/7). In the example item with id of 1 is the main item, it's child is with id 4 and it's grandchild is with id 7. So far, so good. Everything's working okay - insert, edit, delete.
But what is the best way to visualize this for the user? Noone will understand 1/=/4/=/7. I have to replace the id's with their corresponding title (ex. Category1->Category4->Category7).
Hope I explained everything clear. Need your help. Cheers !