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
Validating fields
posted

Hi, I have a list of objects that I'm binding to in my grid, and I'm wondering how to go about validating the input. Each object has some validation rules associated with them, and if I bind a single object to some text boxes, like 

 <TextBox Text="{Binding Path=PostalCode, ValidatesOnDataErrors=True}"/> 

 The default behavior in WPF is the textbox will have a red border. I'm wondering how to duplicate that behavior in the grid.

Is this possible?