For the life of me I can't see what's wrong. I have a radgriview and I edit rowdetails with the raddataform. everything works great except the validation.
I am using the code below metadatatype (as an example) to add validation attributes to a class generated by EF. Obviously, this class is what I have bound to the dataform. I've stripped it to the bare min for this discussion.
The commented out code below shows a "buddy" class that I have implemented as a test to make sure the annotations are working. They are. If I have to create buddy classes and copy data for each returned record from a database query I will, but it seems rather a pain.
Any insight would be greatly appreciated. I read somewhere that this metadata thing is not support by you. Is this true? If so, what is the recommended way of getting the job done?
Thanks ... Ed
[MetadataType(typeof(CALMS_SamplesMetaData))] public partial class CALMS_Samples: ValidatableBindableBase { } public class CALMS_SamplesMetaData : ValidatableBindableBase { private string _clientSampleID; [Required(ErrorMessage = "Required.")] [MaxLength(50, ErrorMessage = "Exceeded 50 characters")] public string ClientSampleID { get { return _clientSampleID; } set { SetProperty(ref _clientSampleID, value); } }} //public partial class CALMS_Samples : ValidatableBindableBase //{ // private string __test1; // [Required(ErrorMessage = "Required.")] // public string test1 // { // get { return __test1; } // set { SetProperty(ref _cli_test1entSampleID, value); } // } //}