I have 3 tables: Item - which is the DataContext - it has a navigation column Group Group - has a navigation column Category.
I want to have in the DataGrid both (Ca
I was using MVVM and I wanted to bind the ItemSource
of the column to a collection of objects in the window data context. I must have tried 10 different ways and nothing worked until I found this answer.
The trick is to define a CollectionViewSource
outside the grid and then reference it inside the grid using StaticResource
. For example,