New to Kendo UI for jQuery? Start a free 30-day trial

Readonly

methods

Gets or sets the read-only state of the PromptBox.

Returns:Boolean

The current read-only state when called without parameters.

<div id="promptbox"></div>
<button id="toggle-readonly">Toggle Readonly</button>
<script>
var promptbox = $("#promptbox").kendoPromptBox({
    placeholder: "Toggle readonly state..."
}).data("kendoPromptBox");

$("#toggle-readonly").click(function() {
    var isReadonly = promptbox.readonly();
    promptbox.readonly(!isReadonly);
});
</script>
Not finding the help you need?
Contact Support