我試圖根據事件禁用窗體。我有一個JQuery腳本,將禁用表/ div的所有輸入等,但DevExpress組合框仍然允許用戶選擇一個選項。控件的輸入部分顯示爲禁用,但是選擇按鈕和下拉菜單仍然有效。如何從客戶端禁用DevExpress MVC組合框(JS/JQuery)
作爲DevExpress客戶端API和Jquery的新手,我的問題是:如何使用跨瀏覽器兼容的方式將控件設置爲禁用?
這裏是我目前有
// jQuery代碼
// Disable all input types in the table
$('#addressTable :input').attr('disabled', true);
// Disable DevExpress MVC Combobox **(Fails)**
$('#StateProvinceType.StateProvinceTypeId').SetEnabled(false);
// HTML擴展代碼
@Html.DevExpress().ComboBox(settings =>
{
settings.Properties.DropDownStyle = DropDownStyle.DropDown;
settings.Name = "StateProvinceType.StateProvinceTypeId";
settings.Properties.ValueType = typeof(int);
}).BindList(Model.States).GetHtml()
使用Name屬性來獲取直接訪問客戶端程序對象(不是ID選擇器) – Mikhail 2012-02-20 08:08:07