HI,
Am using wcf service with silverlight and my datacontract class is exposed in the reference file and am binding a collection of class type to datagrid and while clicking a particular row for editing the entire row data will be binded to a dataform and there i have to validate the fields and here am using a IDataErrorInfo interface to validte,Here in service reference file the class is a partial class and created a new cs file with same namespace of the servicefile and class name then implemented the IDataErrorInfo interface properties
public string this[string
columnName]{}
in the scope i worte the validation .But it is not working can anyone help for this.
Thanks
data annotations like RequiredAttribute and DisplayAttribute etc do not propagated to the generated client side files when using Silverlight 4 and WCF.
This is one solution for the problem…
Create a class library with a model (Model.dll)
sample
In a services project reference this class library
a sample of services could be …
Create a silverlight class library (SL.Model.dll) (this library have the sample model created in Model.dll)
in this class library add existing Item as link and add the model item that have Model.dll
in Silverlight Application reference the SL.Model.dll
when the services reference is create view that reuse types is cheked (It is deafault option)
sample of page …
xaml
code of control …