View Complete Post
I have a table that displays a user control on each row. The user controls are strongly typed to a viewmodel which contains DataAnnotation style validation. If one of the rows has invalid data entered (lets say the 3rd row) the data annotation validates display agains the first row/user control.
How do I get the data annotation to show against the relevant user control?
I'd post a pic to show what I mean except it will not display it!.:/
I have a problem.
In edmx Contact entity PersonalInfo complex type is defined with property FullName and Title.
In view the code is
<div class="editor-label"> <%: Html.LabelFor(model => model.PersonalInfo.FullName) %> </div> <div class="editor-field"> <%: Html.TextBoxFor(model => model.PersonalInfo.FullName) %> <%: Html.ValidationMessageFor(model => model.PersonalInfo.FullName) %> </div>
[MetadataType(typeof(ContactValidation))] public partial class Contact { } public class ContactValidation { public string FullName { get; set; } }
When I submit form get an error of mapping but if I take FullName out of complex type than form is working fine.How I validate FullName if it is in Complex type?
Thanks
I want to Localize DisplayName something like
[Required(ErrorMessageResourceType = typeof(Strings), ErrorMessageResourceName = "Required")] --> Working[DisplayName(ResourceType = typeof(Strings), Name = "TitleLabel")] --> Not workingpublic string Title { get; set; }
Any suggestion pleaseThanks
Is there any support from JQuery for DataAnnotations?
Found this but not sure if its supporting. http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Anyone got any working example?
I'm using RIA and VS2010, lastest bits as of 4-27-2010 I believe.
I've attributed a class that is contained within another (a Customer's child table record's detail table record) but my RIA dataForm with AutoGenerateFields="True" is only showing the "classname : primary key value".
I've changed my DomainService IQueryable<Customer> GetCustomers method to have the .Include("childtable.detailtable") and I can see the data I want displayed in the debugger within it's return value.
I would have imagined the [DisplayColumn("thePropertyIwantToShow")] would help...
Is there a 2 level limitation for Dynamic Data?
Am I missing something fundamental?
Thanks.
Hall of Fame Twitter Terms of Service Privacy Policy Contact Us Archives Tell A Friend