Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo Ui Dropdownlist Set Visible via Javascript

I need to set kendo dropdownlist visible programmatically in javaScript.

I had tried:

dropdownlist=$("#ddl").data("kendoDropDownList");
dropdownlist.visible(false);
dropdownlist.isVisible(true);
dropdownlist.visible("false");
dropdownlist.isVisible("true");

etc...

like image 693
MustafaP Avatar asked Apr 28 '14 13:04

MustafaP


2 Answers

One should always use the API docs to see the features of a widget. In this case, there is no API method for hiding a widget, but you can hide its wrapper element:

var dropdownlist = $("#ddl").data("kendoDropDownList");
dropdownlist.wrapper.hide(); // call wrapper.show() to make it visible again
like image 167
Lars Höppner Avatar answered Sep 20 '22 19:09

Lars Höppner


Try like this,

$("#ddl").closest(".k-widget").hide();
 $("#ddl").closest(".k-widget").show();
like image 23
Jaimin Avatar answered Sep 16 '22 19:09

Jaimin