I used Ajax.BeginForm / Html.BeginForm for a view that sends an object to the controller when submit is clicked. There are some telerik controls that are conditionally disabled. When you click the Submit button, the object cannot receive an existing value in the control, since it is disabled. Therefore, the object is created with zero values. Any help?
I am using jquery to disable these telerik controls when the page loads.
Change.setDropDownValues = function () { if (condition) { $("#A").data('tDropDownList').enabled = false; $("#A").data('tDropDownList').disable(); } } else if (condition) { $('#Pop').attr('disabled', 'disabled'); //text box $('#ShortDesc').attr('disabled', 'disabled'); //textarea $('#LongDesc').attr('disabled', 'disabled'); //text area $('#Cont').attr('disabled', 'disabled'); //text box $('#iDate').attr('disabled', 'disabled'); //datepicker division $('#C').data('tDropDownList').enabled = false; //drop down list $('#C').data('tDropDownList').disable(); } };
Can anyone tell me how to redo so that I can get the values โโof the disabled field?
source share