5

Currently, I have a DataGrid which is bound to some data in my ViewModel. I have ValidationRules set up for the Rows, and the Columns. What I would like to do is prevent the user from saving the file if there are any Validation Errors. I am using the RelayCommands class to route the Open, Save, etc commands to my ViewModel.

s73v3r
  • 1,751
  • 2
  • 22
  • 48

2 Answers2

0

You might be interested in the BookLibrary sample application of the WPF Application Framework (WAF). It disables the Save button when a validation error is active (e.g. DataGrid).

jbe
  • 6,976
  • 1
  • 43
  • 34