Does anyone have sample WPat Datagrid code working in MVVM pattern?

I got the following WPF DataGrid example related to ViewModel in MVVM template, but it is read-only:

An MVVM example that has buttons that switch data in a ViewModel

I tried expanding it so that the DataGrid was tied to the ViewModels observable collection, so that editing the cells would result in OnPropertyChanged events in the corresponding ViewModels, but could not make them work the way I wanted.

Does anyone know an example code that does this, i.e. binds a DataGrid to a ViewModels collection with OnPropertyChanged properties and delegated commands , etc.

+3
source share
1 answer

Jaime Rodriguez and Karl Schifflett conduct the MVVM training road show. They developed a demo application (which uses a datagrid), maybe you want to look at this application, as well as at the documents ...

http://blogs.msdn.com/jaimer/archive/2009/02/10/mv-vm-training-day-sample-application-and-decks.aspx

+1
source

Source: https://habr.com/ru/post/1709651/


All Articles