In Kendo MVVM, I keep track of a radio button groups' selected state. At some point I would like to reset the radio buttons for a group to become unchecked. I tried the following and it does not seem to work:
<input type="radio" value="1" data-bind="checked: selectedRadio1"/>
var viewModel = kendo.observable({
selectedRadio1: null
};
kendo.bind(document.body, viewModel);
Set the value, by clicking on a radio option (selectedRadio1 has value).
Reset the value
viewModel.set('selectedRadio1', null);
The reset doesn't work because the value null does not exist as radio button value. How do you get it to properly reset? Is data-bind="checked: ..." the right approach?
Kendo dojo link here: http://dojo.telerik.com/AgAxo
As you said there is no radio button with value "null", therefor observable object won't find any suitable DOM to move the checked property.. Until the developer of observable rewrite how checked property work with null value, you could use jquery or javascript code for this
check this dojo