This question is locked. New answers and comments are not allowed.
Hello everyone,
i have just upgraded from telerik q3 2010 to q1 2011 beta. in grid editing i have checkbox that enables/disables two fields (one text and one dropdown list) using jquery. when i used this setting with q3 2010 release, it does not post any value for disabled field but in q1 2011 it posts null value for disabled field that makes my modelstate false in the controller. my model looks something like
Strange thing is that error appears for the key HospitalID when it is nullable and does not have any required check on it. why it is an error? plz look at two screen shots to see the input scenarios
i have just upgraded from telerik q3 2010 to q1 2011 beta. in grid editing i have checkbox that enables/disables two fields (one text and one dropdown list) using jquery. when i used this setting with q3 2010 release, it does not post any value for disabled field but in q1 2011 it posts null value for disabled field that makes my modelstate false in the controller. my model looks something like
public class VMDoctorHospital { [HiddenInput(DisplayValue = false)] public int DrHospitalID { get; set; } [HiddenInput(DisplayValue = false)] public int DoctorID { get; set; } [DisplayName("Personal Clinic?")] public bool PersonalClinic { get; set; } [DisplayName("Clinic Name")] public string ClinicName { get; set; } [DisplayName("Hospital"), UIHint("IntStrEditor")] public int? HospitalID { get; set; } [DisplayName("Doctor's Position")] public string DoctorPosition { get; set; } [DataType(DataType.PhoneNumber), DisplayName("Phone Number"), RegularExpression(@"(0|00)\d{9,12}", ErrorMessage = "0518782645 or 0092518782645")] public string PhoneNumber { get; set; } [DisplayName("Morning From")] public string MorningFromTiming { get; set; } [DisplayName("Morning To")] public string MorningToTiming { get; set; } [DisplayName("Evening From")] public string EveningFromTiming { get; set; } [DisplayName("Evening To")] public string EveningTotiming { get; set; } [DisplayName("Morning Patients"),RegularExpression(@"\d*",ErrorMessage = "Numbers only")] public int? MorningOPD { get; set; } [DisplayName("Evening Patients"), RegularExpression(@"\d*", ErrorMessage = "Numbers only")] public int? EveningOPD { get; set; } public string BTV { get; set; } [UIHint("BestDay")] public string BDV { get; set; } [UIHint("BuyingMotive"),DisplayName("Buying Motive")] public string BuyingMotive { get; set; } [HiddenInput(DisplayValue = false)] public string HospitalClinicName { get; set; } [DataType(DataType.MultilineText)] public string Chemist { get; set; } }