문제

I'm not using WCF RIA Services... I've got a custom OData service that my SL4 application is using. I need to add validation to my forms. I notice the proxy that VS2010 creates does not implement IDataErrorInfo on the entities. I'm tyring to add it to my view model, but the validation isn't being recognized by my SL app.

Is it possible to add validation like this? Surprised I haven't been able to find more results on this in my searches... :(

도움이 되었습니까?

해결책

Have your ViewModel implement INotifyDataErrorInfo and it should be working. :)

다른 팁

Figured it out (can't believe this didn't occur to me). The proxy generated by VS2010 for the OData service generates partial classes. All I had to do was create a new partial class & implement INotifyDataErrorInfo.

Thanks for the interface pointer Einarsson!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top