Too Much Lost Time With ListView - HELP!
-
Monday, November 30, 2009 6:50 PMBackground: 3 Tables: Table1, Table2, Table3. Table1 is the first in what amounts to a hierarchy. It has an Identity key. Table 2 is the second. It has an Identity key and also a field pointing to appropriate Key ID of table 1. Table 3 is the third table. It has an Identity key and also a field pointing to the appropriate Key ID of table 2. Using Entity Framework, Table 1 is loaded with a Dim t=from i in ef.T.Include(Table2). A stack panel with Textboxes displays data from Table1, good so far. A listview displays appropriate (i.e. data related to Table 1) data from Table 2, good so far. However, I cannot seem to define a binding that will load another Listview showing appropriate data from Table 3 based on a selection made from items displayed from Table 2 in the second listview. Any help resolving this would be much appreciated as I have spent mucho time searching and experimenting. Thanks.
All Replies
-
Monday, November 30, 2009 7:07 PMIs the problem just defining the binding? Have you tried something like this:
"{Binding RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type YourTable2Type}}"Not sure if this is exactly what you mean but it sounds like it. You might have to twiddle with the syntax if its what you are looking for. -
Friday, December 04, 2009 9:57 AM
Hi,
You can bind the second ListView to the SelectedItem of the first ListView, there's a sample demonstrates how to do this on our All-In-One Code Framework project, you can check it here:
http://cfx.codeplex.com/sourcecontrol/changeset/view/36107?projectName=cfx#760157
If you have any questions, please feel free to let me know.
Best Regards,
Zhi-Xin
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework!- Marked As Answer by Expressive Friday, December 04, 2009 3:39 PM
-
Friday, December 04, 2009 3:44 PMYep, works just fine! Much thanks for helping getting past this bottleneck.

