title: C# code equivalent for Applying RowValidationRules on DataGrid in WPF
body: <p>We can apply RowValidationRules on a DataGrid by using following XAML.</p>
  
  <pre><code>&lt;DataGrid.RowValidationRules&gt;
    &lt;local:MyValidationClass ValidationStep="UpdatedValue"/&gt;
  &lt;/DataGrid.RowValidationRules&gt;
  </code></pre>
  
  <p>I want to know how can I achieve same through C# Code?</p>