readonlyBoolean
(default: "false")
If set to true
, the widget will be readonly and will not allow user input. The widget is not readonly be default and allow user input.
Example - make the widget readonly
<input id="dropdownlist" />
<script>
$("#dropdownlist").kendoDropDownList({
readonly: true,
dataSource: [
{ productName: "Product 1", productId: 1 },
{ productName: "Product 2", productId: 2 },
{ productName: "Product 3", productId: 3 },
{ productName: "Product 4", productId: 4 }
],
dataTextField: "productName",
dataValueField: "productId",
optionLabel: "-- Please select --",
optionLabelTemplate:'<span style="color:red">-- Please select --</span>'
});
</script>
In this article