Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle Wpf DataGrid CellEditEnding event in MVVM?

Tags:

mvvm

wpf

datagrid

MVVM doesn't allow code behind and so event handling. So what's the MVVM way to be notifyed that a cell been changed ?

like image 385
Erez Avatar asked Nov 25 '22 18:11

Erez


1 Answers

Its a pretty legit and obvious question since there are pretty legit solutions to the problem for MVVM. I guess someone marked it down because this has probably been asked countless times before.

I know there is something built in to do this in .Net4. I am stuck at .Net3.5 so I use the CommandReference class from the WPF toolkit, to convert an event in the view to a command in a viewmodel.

like image 120
NVM Avatar answered Dec 09 '22 21:12

NVM