Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complex Listbox
Message
From
06/11/2009 17:28:17
 
 
To
06/11/2009 17:14:45
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Title:
Miscellaneous
Thread ID:
01433632
Message ID:
01433633
Views:
53
>I need to display some data from an XML file in a list, but unsure how to exactly handle it.
>
>The data looks like this:
>
><Parents>
>   <Parent Name="Parent1">
>      <Child Title="Child1" Print="Y" Active="Y" PrintPath="C:\Print" LogPath="C:\Log" />
>      <Child Title="Child2" Print="Y" Active="Y" PrintPath="C:\Print" LogPath="C:\Log" />
>   </Parent>
>   <Parent Name="Parent2">
>      <Child Title="Child1" Print="Y" Active="Y" PrintPath="C:\Print" LogPath="C:\Log" />
>   </Parent>
>   <Parent Name="Parent3">
>      <Child Title="Child3" Print="Y" Active="Y" PrintPath="C:\Print" LogPath="C:\Log" />
>   </Parent>
></Parents>
>
>
>Here's how the user wants things displayed. (The ^ indicates an Expander):
>
>^ Parent: Parent1
>    ^ Child: Child1
>        Print: Y   Active: Y           
>        Print Path: C:\Print
>        Log Path: C:\LogPath
>    ^ Child: Child2
>        Print: Y   Active: Y           
>        Print Path: C:\Print
>        Log Path: C:\LogPath
>^ Parent:  Parent2
>
>
>Here are the issues:
>- There can be multiple Parent elements
>- There can be multiple child elements per parent
>- Any parent or child can be deleted
>- Any parent or child can be copied and pasted
>- A new parent or child can be added
>
>I'm thinking of solving it this way:
>- Place everthing in a list box
>- Put parent records in an expander
>- Put a stack panel in the Parent expander
>- Put child records in an expander in the stack panel and use a group box to hold the attributes
>
>Here's what I'm not sure about:
>How do I handle an unknown number of child records per parent?
>How do I deal with insert/delete of child records?
>
>I'll take any suggestions for solving this.

Is an editable treeview out of the question?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform