Hello,
I am looking for advice on how to approach a need in my app.
My best way to try to explain my need would be ‘dynamic grid view based on hierarchical filter’ ??
I am quite new to YII.Spent 2 weeks reading docs and succeeded in creating a core app with a sqlite relation database. Giix and Yii allow for amazing results !
To the point:
I have the following scheme (for an inventory system, this is a simplified model)
Object Room Level Building
------ ------- ----- --------
id / id / id / id
name / room / level / building
Room_id / Level_id / Building_id /
an object can be in only one room. a room can host many objects.
0-to-Many relations all the way in fact.
I succeed in having basic views and manage the whole thing quite well.
I need to go further, and I want to design a VIEW where I can select the building, then the Level, then the Room, and know at every level how many objects are in the defined location. for example I wish to obtain something like
- a dynamic menu:
- Building1 (9) (meaning 9 objects in buildingA)
- Building2 (7)
- - Level1 (5)
- - Level2 (2)
- - - Room1 (3)
- and on the right of the page, a cGridView (or else) with Objects data reflecting the selection on the left menu.
I am not asking for someone to do my work,
I am just a little lost on how to achieve this.
I read a lot about tree views, but here I don’t have a “tree-type” database.
Any help on the best way to approach this is very welcome.
thank you for your time trying to help me.
best regards
Olivier.