WPF lengthy Validation Scenario -


  • In my scenario I have a Linq2 SQL data backend.
  • My data object applied to IDataErrorInfo like name == null (Fast Validationrules is required to execute only that value, nothing special yet)

  • P>
  • Dataobjects are organized to catch errors in a tree-structure, so each has a parent and child

If a chosen name is unique under the parent of parents of a databizax, then how do I verify Can i do

The problem is facing that, unique name recognition is a database round trip which if typing lags is required UpdateSourceTrigger = "PropertyChanged" to the name of the text box is.

On the other side, I can set UpdateSourceTrigger = "LostFocus" , but the problem is that I am enabling / disabling the "save" button on valid / invalid data . Now in the invalid state you can not click on the Save button with the LostFocus, so there is no way to update the lost text box (Only remove the tab which is ugly, but there are more "unusabilities" than this (for example During the error typing and showing the name as such) different validationrules are changing the way of saying to apply it on different events like

what was ideal.

 < D>  Grid.Column = "1">   ​​& lt; /Binding.ValidationRules> & lt; / binding & gt; & lt; /TextBox.Text> & lt; / text box & gt;  

What is the best way to solve this solution?

Edit

It seems that this will be a compulsory group. I look at it ...

After all, I figured out a way to complete what I wanted. The Binding group was used, but I solved my solution because that was the only way I needed it necessary to show the Validationer in the right text box.

I now have an associated property that I read the execution of the "save" procedure. Then I manually validated and set a verification error on the text box. In this way, the text box can keep its current antivirus updatestring trigger and long validation is performed on submission.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -