This question is locked. New answers and comments are not allowed.
Seems every second post is about disabling the NumericTextBox
I have a answer the following scenario:
I wanted the input grayed out on page load (disabled)
BUT I wanted the spinners to be functional
Html.Telerik().PercentTextBox().HtmlAttributes(new { disabled = "disabled" })
Then when the spinner is activated, I want the textbox enabled: ClientEvents(events => events.OnChange("Changed"))
function Changed(e) {
TogglePercentage(e.target, true);
TotalSplit -= e.oldValue;
TotalSplit += e.newValue;
if (TotalSplit > 100) {
alert('Total needs to be less than or equal to 100%');
}
function TogglePercentage(TextBox, enable) {
if (enable)
TextBox.find('> .t-input').removeAttr('disabled');
else TextBox.find('> .t-input').attr('disabled', true);
}