I am new to Kendo. Iam using Html.Kendo().CheckBoxFor(m => m.Enable) in MVC cshtml. Unable to add event change for this checkbox. I used Html.Kendo().DropDownListFor which has .Events(e => e.Change("PopulateCountry")) But I dont see same type of event in CheckBox. can anyone help on this
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The Html.Kendo().CheckBoxFor helper renders a regular html5 checkbox. It is not actually a kendo widget like Html.Kendo().DropDownListFor creates. I believe this is why the helper for CheckBox is lacking an .Events option.
Regardless, you can use the .HtmlAttributes option to add a change handler to the checkbox element instead:
.HtmlAttributes(new { onchange = "PopulateCountry();" })