General information
Category:
Forms & Form designer
Steve
What I did was showing the child in different color, it was OK for a demo but your example gave me an idea that might meet the requirements.
I believe adding an extra column to the grid left side where it will be empty for a child and have a plus for the parent or some visual indications.
In other word, I can show the grid as in the expand mode but the only limit is that they can not collapse it which not critical for what I need.
Thanks
>Mo,
>
>I asked because of the way you posed the question. I was unsure if you knew about the VFP way to do it and perferred to find another control.
>
>Try this and see if it meets your needs. I use a browse statement in the example but it works in a grid as well.
>
>CREATE CURSOR PTAble (PID I, PName C(50))
>CREATE CURSOR CTAble (CID I, PID I, CName C(50))
>
>SELECT PTAble
>APPEND BLANK
>REPLACE PID WITH 1, PName WITH "Parent 1"
>APPEND BLANK
>REPLACE PID WITH 2, PName WITH "Parent 2"
>APPEND BLANK
>REPLACE PID WITH 3, PName WITH "Parent 3"
>
>
>SELECT CTAble
>APPEND BLANK
>REPLACE CID WITH 1, PID WITH 1, CName WITH "Child 1"
>APPEND BLANK
>REPLACE CID WITH 2, PID WITH 1, CName WITH "Child 2"
>APPEND BLANK
>REPLACE CID WITH 3, PID WITH 1, CName WITH "Child 3"
>
>APPEND BLANK
>REPLACE CID WITH 4, PID WITH 2, CName WITH "Child 4"
>APPEND BLANK
>REPLACE CID WITH 5, PID WITH 2, CName WITH "Child 5"
>APPEND BLANK
>REPLACE CID WITH 6, PID WITH 2, CName WITH "Child 6"
>
>APPEND BLANK
>REPLACE CID WITH 7, PID WITH 3, CName WITH "Child 7"
>APPEND BLANK
>REPLACE CID WITH 8, PID WITH 3, CName WITH "Child 8"
>APPEND BLANK
>REPLACE CID WITH 9, PID WITH 3, CName WITH "Child 9"
>
>SELECT CTAble
>INDEX ON PID TAG PID
>
>SELECT PTAble
>SET RELATION TO pid INTO Ctable ADDITIVE
>SET SKIP TO Ctable
>GO TOP
>BROWSE FIELDS PTable.pid, PTable.PName, CTable.cid, CTable.cname
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only