8:23 "I think this is a bit of inconsistency." Normally Venkat followed up with "To fix this, we can...." haha.
@conaxlearn85664 жыл бұрын
After 5 months, still not fixed. 😣
@vinothdharmaraj75104 жыл бұрын
Hi Venkat, Why don't to write the EditEmployeeModel class inherit Employee class? is anything problem with that
@nys82604 жыл бұрын
Thank You, we can make the class like this: public class EditEmployeeModel : Employee { [CompareProperty("Email", ErrorMessage = "Email and Confirm Email must match")] public string ConfirmEmail { get; set; } }
@vinothdharmaraj75104 жыл бұрын
Compare validation not work for two different types
@vinothdharmaraj75104 жыл бұрын
It may work also like following but compare validation not work public class EditEmployeeModel { pubic Employee Employee {get; set;} = new Employee(); [CompareProperty("Email", ErrorMessage = "Email and Confirm Email must match")] public string ConfirmEmail { get; set; } }
@arkarsb84474 жыл бұрын
'EmailDomainValidator' is inaccessible due to its protection level in EditEmployeeModels and can't change access modifier level in 'EmailDomainValidator'. What am I wrong? Please sir.
@alikerimerkan4 жыл бұрын
Why didnt we simply create a textbox with the id="ConfirmEmail" and add an eventhandler into it for checking if two email values are equal to each other? All this EditEmployeeModel class was completely unnecessary i think
@cookingincanada4 жыл бұрын
I love your videos. I learned a lot from your video! Wanna be KZbin friends?
@eugenelee43514 жыл бұрын
I put the same attribute to the Email property also, for comparing to the field of the "Confirmed email" , now when I change email i get the warning that the there is a mismatch between email and confirmed email fields
@conaxlearn85664 жыл бұрын
Yes, but when the emails match, the error message stays.
@PinasPiliNa9994 жыл бұрын
internal RenderFragment CreateCustomEditor(KeyValuePair cEditor) => builder => { if (cEditor.Value is ComboBoxEdit) { var c = cEditor.Value as ComboBoxEdit; PropertyInfo prop = mItem.GetType().GetProperty(c.FieldName); builder.OpenComponent(0, typeof(InputSelect)); var value = prop.GetValue(mItem); builder.AddAttribute(1, "Value", value); builder.AddAttribute(2, "class", "form-control h-100 w-100"); builder.AddAttribute(4, "ValueChanged", RuntimeHelpers.TypeCheck(EventCallback.Factory.Create (this, EventCallback.Factory.CreateInferred (this, __value => prop.SetValue(mItem, __value), (string)prop.GetValue(mItem))))); // Create an expression to set the ValueExpression-attribute. var constant = System.Linq.Expressions.Expression.Constant(mItem, mItem.GetType()); var exp = System.Linq.Expressions.MemberExpression.Property(constant, c.FieldName); var lamb = System.Linq.Expressions.Expression.Lambda(exp); builder.AddAttribute(5, "ValueExpression", lamb); builder.OpenElement(6, "option"); builder.AddAttribute(7, "value", "Wild"); builder.AddContent(8, "Wild"); builder.CloseElement(); //builder.AddMarkupContent(6, "Wild"); //builder.AddMarkupContent(7, "Common"); builder.CloseComponent(); @* Wild Domestic Common *@ } }; above code creates the InputSelect control but dropdown list does not contain any list. what am i missing ? kindly suggest