O'Reilly logo

Managing Data and Media in Microsoft Silverlight 4: A mashup of chapters from Packt's bestselling Silverlight books by Todd Snyder, Kevin Dockx, Gill Cleeren, Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validating the DataGrid

Validation of your data is a requirement for almost every application in order to make sure that no invalid input is possible. If you're using a DataGrid, then you can easily implement validation by using data annotations on your classes or properties. This control picks up these validation rules automatically and even provides visual feedback. In this recipe, you'll learn how to get your DataGrid to implement this kind of validation.

Getting ready

You can find a starter solution for this recipe located in the Chapter05\DataGrid_Validation_Starter folder in the code bundle that is available on the Packt website. The finished solution for this recipe can be found in the Chapter05\DataGrid_Validation_Completed folder.

How to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required