1

I have a kendo multiselect on a page and I want to disable it based on a certain criteria. Is it posible to do that ? If not, could you please tell me a workaround for it ?

Thank you

Sebastian
  • 617
  • 2
  • 10
  • 30

2 Answers2

4
var multiselect = $("#multiselect").data("kendoMultiSelect");
multiselect.enable(false);

Docs: http://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect#methods-enable

Alaa Masoud
  • 7,085
  • 3
  • 39
  • 57
1

I want to disable it based on a certain criteria

If you want to disable at server-side, you can use Enable. Otherwise, you can use @Alaa Masoud's answer to disable at client-side.

For example,

@(Html.Kendo().MultiSelectFor(model => model.Ids)
    .BindTo(Model.AvailableNames)
    .DataTextField("Text")
    .DataValueField("Value")
    .Enable(Model.IsActive))
Win
  • 61,100
  • 13
  • 102
  • 181