oak29
asked on
Nested Generic List
I'm trying to create a nested generic list. My first List consists of a list of datarows. I would like the first list to be the parent list and then also give this list a child list of datarows but I'm unsure of the syntax or if this is even possible. any ideas?
ASKER
I guess I'm not sure how this creates a parent list of datarows with a list of children datarows that are assigned to parent. Maybe I'm missunderstanding.
Could you show me the syntax for adding the parent row and also adding the child rows in a different list beneath parent. There can be multiple parent rows. This is why I want a seperate list for them.
Could you show me the syntax for adding the parent row and also adding the child rows in a different list beneath parent. There can be multiple parent rows. This is why I want a seperate list for them.
I think I misunderstood your question itself. Can you please explain your question in detail.
for me nested list means List of List
for me nested list means List of List
ASKER
I'm trying to find a way to manage two datatables in memory that relate to each other. The datarows of the parent table are created by a user button. I then need to create at the same time multiple datarows that are the children of the parent datarow.
There can be multiple datarows in the parent table that have their own children rows. I thought that I could use lists to accomplish this linking. Is there a better solution for what I'm trying to accomplish?
There can be multiple datarows in the parent table that have their own children rows. I thought that I could use lists to accomplish this linking. Is there a better solution for what I'm trying to accomplish?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
And here I am initializing it:
Open in new window
then assignment of datarow to first item of lstDataRows list
Open in new window