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
110
Cell Validators
posted

Is there an equivalent of the windows forms validators which can be used in the wpf datagrid ? Or do i need to do something bespoke. Do you have an example of your best practice cell validation ?

 Paul.

Parents
No Data
Reply
  • 2070
    posted

    Hi Paul,

     

    Editors have a ValueConstraint property. You can specify various constrants on input like min/max, regex etc... Set the field's EditorStyle to a style that sets ValueConstraint and every cell of the field will honor those constraints. Also editors have InvalidValueBehavior property that specifies whether to revert the value, display a message box etc...

     

    Hope this helps,

    Sandip

Children
No Data