This project has moved and is read-only. For the latest updates, please go here.

Validation Error not throwing

Jul 5, 2011 at 9:25 PM


I am working on SL3 with MVVM Light.  

I have a datagrid which has a column, Name  to be validated which I want to prevent the user from entering special characters. 

I have written the logic in the setter for the Name field corresponding in Model (in WCF service)  to the column in the datagrid.  That is,  to throw an ArgumentException whenevr user enters an ivalid character and submit. 

Then the datagrid column is declared like this <data:DataGridTextColumn Header="Name"  MinWidth="200"  Binding="{Binding Name,Mode=TwoWay,ValidatesOnExceptions=true}" Width="Auto"></data:DataGridTextColumn >
I can see the setter property in the Model throwing an exception correctly. But I cannot see any error indication in the Datagrid column. 

I am wondering am I missing something here.?Appreciate your help.