Validating during an input

Grids for WPF Forum

Posted 10 years ago by Snupru - Germany
Version: 13.2.0591
Avatar

Is it possible to validate during a input?

[Modified 10 years ago]

Comments (7)

Answer - Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi,

Yes please take a look at the "Data Validation" QuickStart and documentation topic.  Those describe how to do so.


Actipro Software Support

Posted 10 years ago by Snupru - Germany
Avatar

I can't find any samples

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, the samples are installed with the product when you run the installer on you machine.  You can get to the sample project from the Windows all programs menu.  There will be a group of links for Actipro WPF Controls.


Actipro Software Support

Posted 10 years ago by Snupru - Germany
Avatar

I can't find any samples in the QuickStart or documentation.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Both the "Data Validation" QuickStart and "Data Validation" documentation topic talk about and/or show how to validate the results of what an end user commits as a value.


Actipro Software Support

Posted 10 years ago by urbi
Avatar

Hello.

I'am working on the same issue as snupru and can't find any sample, too.

 

I tried to validate an input in the PropertyGrid on KeyUp-Event (while typing)

The QuickStart only show's validation when a end user commits a value.

 

Is there the possibility to handle/catch this event?

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello, that is correct, the PropertyGrid validation is based around what is committed to the properties being edited.

If you want to validate while the end user is typing, that would be more of a function of the property editor in use for editing the property.  You can make custom property editors (also shown in the samples and documentation) that could use custom controls for input.  Then in those custom controls, you could block certain characters from being typed such as with KeyDown.

The only other thing you could do is if you have our default styles/templates, you could clone them and change the property editor template for the one you need here to bind the editor control (textbox, or whatever it is in the template) to have the binding UpdateSourceTrigger be on PropertyChanged instead of LostFocus.  That way our PropertyGrid validation code would kick in as the user types. 


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.