Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
XamDataGrid Validation using Exceptions in View Model
posted

I want to turn off the "Unable to set cell value" pop up box. 

I bound the XamDataGrid to an observable collection and turned on exceptions and off notification like this:

<igDP:

 

 

XamDataGrid x DataSource="{Binding Members, ValidatesOnExceptions=True, NotifyOnValidationError=False}" ...

I have ViewModels for the window and ViewModels for the Members in the list.
in the MemberViewModel on one of the properties that is bound to the grid I throw an exception if the value does not pass validation logic. 

The Grid displays a pop up: "Unable to set cell value".  It does not use the message from the exception. 

I would like to turn off that pop up and provide my own before I throw the exception or something like that.  How can I do this?

  • 12875
    posted

    Are you implementing the IDataErrorInfo interface?    Could you give me more information about how you are handling an invalid value?

    I think a small sample would be very helpful.  If you could attach it to this thread.