The Window widget displays content in a modal or non-modal HTML window.
This example demonstrates passing basic options to the Window plugin.
<input type="checkbox" data-bind="checked: isOpen" /> Open<br/>
<div data-bind="kendoWindow: { isOpen: isOpen, visible: false }">
Window Content
</div>
var ViewModel = function() {
this.isOpen = ko.observable(false);
};
ko.applyBindings(new ViewModel());
This example demonstrates passing additional options in the data-bind attribute.
<input type="checkbox" data-bind="checked: isOpen" /> Open<br/>
<div data-bind="kendoWindow: { isOpen: isOpen, visible: false, actions: ['Close', 'Minimize', 'Maximize', 'Refresh'], modal: true }">
Window Content
</div>
var ViewModel = function() {
this.isOpen = ko.observable(false);
};
ko.applyBindings(new ViewModel());
This example demonstrates setting global options in ko.bindingHandlers.kendoWindow.options. This helps to simplify the markup for settings that can be used as a default for all instances of this widget.
<input type="checkbox" data-bind="checked: isOpen" /> Open<br/>
<div data-bind="kendoWindow: { isOpen: isOpen }">
Window Content
</div>
var ViewModel = function() {
this.isOpen = ko.observable(false);
};
ko.bindingHandlers.kendoWindow.options = {
actions: ['Close', 'Minimize', 'Maximize', 'Refresh'],
modal: true,
visible: false
};
ko.applyBindings(new ViewModel());