I need to locate a cell/column in a Silverlight 3 DataGrid so that I can call UpdateSource on it. How can I do that?
This is why, in case you're interested:
I have a DataGrid in a Silverlight 3 app which displays objects which are decorated with DataAnnotations attributes such as [Required], for validation purposes. I'm populating the DataGrid from an imported CSV file. The imported rows will be invalid because the CSV doesn't contain all of the Required fields.
Validation works, if the user edits the fields in the datagrid or when I call submit (it's a WCF RIA Services app). What I'd like to do it trigger validation as soon as the datagrid is loaded. From lots of reading, it seems there's no built-in way to do this.
I've figured that if I can locate the field in the first row in the datagrid and call UpdateSource(), I'll trigger a validation error. How can I navigate into a manually-defined datagrid?