Answer the question
In order to leave comments, you need to log in
Is it possible to make a tree in a table?
Hello.
I have a table in db
id
productNr
productPartNr
partNr
cost
status
i am currently displaying this table through a simple GridView like this:
id | productNr | productPartNr | partNr | cost | status
and would like to show the whole thing as a tree:
----------------------------------------
| | id | cost | status |
----------------------------------------
|+ productNr1 | 1 | 10 | + |
----------------------------------------
|-+ productPartNr1| 2 | 5 | - |
----------------------------------------
|--- partNr1 | 3 | 2 | + |
----------------------------------------
Answer the question
In order to leave comments, you need to log in
You need to decide what type of tree the task requires, there are several of them.
As a variant of NestedSet, there are also Yii widgets for output under this case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question