1
我有一個複選框,應該在勾選時啓用Kendo MVC DropdownList,並在未選中時啓用diable DropdownList。但我做不到,有問題。你能建議我該如何解決這個問題。使用複選框禁用kendo mvc dropdownlist
<input type="checkbox" onclick="if (this.checked) { document.getElementById('ParentDeptDrp').disabled = true; } else { document.getElementById('ParentDeptDrp').disabled = false; }" />
Is Product/Service?
<br />
@(Html.Kendo().DropDownList()
.Name("ParentDeptDrp")
.DataTextField("DeptName")
.DataValueField("DeptName")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetParentDeptt", "Department");
})
.ServerFiltering(true);
})
.SelectedIndex(1)
//.Enable(false)
)
非常感謝你。 – 2015-02-24 07:21:45