This question is locked. New answers and comments are not allowed.
have a cascading dropdown list of coutry-province in an applicant's address.
My trouble here is that at the initial binding of the applicant's country and province I want both dropdowns disabled.
Now I disabled the coutry dropdown without problem, but the province dropdown is enabled after the ajax call to the server.
@(Html.Telerik().DropDownListFor(model => model.Applicant.Country)
.BindTo(Model.Countrys)
.Enable(false)
.CascadeTo("Applicant_Province")
) *
@Html.ValidationMessageFor(m => m.Applicant.Country)
@(Html.Telerik().DropDownListFor(model => model.Applicant.Province)
.ClientEvents(events => events.OnDataBinding("onProvinceDropDownListDataBinding"))
.ClientEvents(events => events.OnDataBound("onProvinceDropDownListDataBound"))
.Enable(false)
.DataBinding(binding => binding.Ajax().Select("AjaxLoadProvinces", "Order"))) *
@Html.ValidationMessageFor(m => m.Applicant.Province)
In the function: onProvinceDropDownListDataBound
I tried to disable the dropdown, which does not work either.
$('#Applicant_Province').data("tDropDownList").disable();
Thanks.
My trouble here is that at the initial binding of the applicant's country and province I want both dropdowns disabled.
Now I disabled the coutry dropdown without problem, but the province dropdown is enabled after the ajax call to the server.
@(Html.Telerik().DropDownListFor(model => model.Applicant.Country)
.BindTo(Model.Countrys)
.Enable(false)
.CascadeTo("Applicant_Province")
) *
@Html.ValidationMessageFor(m => m.Applicant.Country)
@(Html.Telerik().DropDownListFor(model => model.Applicant.Province)
.ClientEvents(events => events.OnDataBinding("onProvinceDropDownListDataBinding"))
.ClientEvents(events => events.OnDataBound("onProvinceDropDownListDataBound"))
.Enable(false)
.DataBinding(binding => binding.Ajax().Select("AjaxLoadProvinces", "Order"))) *
@Html.ValidationMessageFor(m => m.Applicant.Province)
In the function: onProvinceDropDownListDataBound
I tried to disable the dropdown, which does not work either.
$('#Applicant_Province').data("tDropDownList").disable();
Thanks.