WPF DataBinding, CollectionViewSource, INotifyPropertyChanged

Posted by plotnick on Stack Overflow See other posts from Stack Overflow or by plotnick
Published on 2010-03-11T16:54:06Z Indexed on 2010/03/11 17:39 UTC
Read the original article Hit count: 1256

First time when I tried to do something in WPF, I was puzzled with WPF DataBinding. Then I studied thorougly next example on MSDN: http://msdn.microsoft.com/en-us/library/ms771319(v=VS.90).aspx

Now, I quite understand how to use Master-Detail paradigm for a form which takes data from one source (one table) - both for master and detailed parts. I mean for example I have a grid with data and below the grid I have a few fields with detailed data of current row.

But how to do it, if detailed data comes from different but related tables? for example: you have a Table 'Users' with columns - 'id' and 'Name'. You also have another table 'Pictures' with columns like 'id','Filename','UserId'. And now, using master-detail paradigm you have to built a form. And every time when you chose a row in a Master you should get all associated pictures in Details.

What is the right way to do it? Could you please show me an example?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf