Reputation: 355
I create a custom popup_editor
here, and what I want to achieve when add
new record,
If radio button Percentage
checked disable amount field, else if radio button Amount
checked disable percentage field. (refer to image below). And how to do default value in text field? Thank for helping me.
Upvotes: 1
Views: 231
Reputation: 595
Try this
If radio button Percentage checked disable amount field, else if radio button Amount checked disable percentage field. (refer to image below)
edit: function(e){
$('#RadioPercentage').change(
function(){
if ($(this).is(':checked')) {
$("#percentage").removeProp("disabled").removeClass("k-state-disabled");
$("#amount").prop("disabled", true).addClass("k-state-disabled");
}
});
$('#RadioAmount').change(
function(){
$("#amount").removeProp("disabled").removeClass("k-state-disabled");
$("#percentage").prop("disabled", true).addClass("k-state-disabled");
});
},
And how to do default value in text field?
Try this (inside "edit"), every time you open the popup you find that value, if you want to do it once just enter a flag
$("[type='text']").val("default");
Any idea how I can use kendoNumericTextBox for percentage and amount? Appreciate your help
Try this
Upvotes: 1