Quantcast
Channel: Silverlight 5 forum
Viewing all articles
Browse latest Browse all 1083

ICustomTypeProvider with DataAnnotations Validation

$
0
0

Hi,

I make a CustomTypeHelper class based on Alexandra Rusina example from "Binding to Dynamic Properties with ICustomTypeProvider (Silverlight 5 Beta)"

I've modified GetIndexParameters() to make it work for editable DataGrid:

publicoverrideParameterInfo[] GetIndexParameters(){ returnnewParameterInfo[0];}

When I make a new Type with custom properties everything works perfect. It allow to modify properties, remove and add a new one. DataGrid Binding works just perfect. Problem starting after I'm trying to modify a cell. First edit works perfect. After it I replace property to an other one and trying to modify cell second time. DataAnotations Validation fire an error "Property not found". Apparently it's looking for an old property. Seems like DataAnotations cache Type and looking for an old property in already modified Type.                      Is there a way to work around? Disable or force to refresh DataAnotations cache?


Viewing all articles
Browse latest Browse all 1083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>