kendo.ui.Window
Edit this docRepresents the Kendo UI Window. Inherits from Widget.
No results. Try clearing the filter.
The buttons for interacting with the window. Predefined array values are "Close", "Refresh", "Minimize",
and "Maximize".
A collection of {Animation} objects, used to change default animations. A value of false
will disable all animations in the widget.
The animation that will be used when a Window closes.
Effect to be used for closing of the popup.
Difines the animation duration.
Whether the effect should play backwards, useful when doing the same animation but with the opposite direction, like opening and closing.
The animation that will be used when a Window opens.
Effect to be used for opening of the popup.
Difines the animation duration.
Whether the effect should play backwards, useful when doing the same animation but with the opposite direction, like opening and closing.
The element that the Window will be appended to.
Note that this does not constrain the window dragging within the given element.
Set the window container to be the form with id="mainForm"
$("#dialog").kendoWindow({
appendTo: "#mainForm"
});
Specifies a URL or request options that the window should load its content from.
Note: For URLs starting with a protocol (e.g. http://),
a container iframe element is automatically created. This behavior may change in future
versions, so it is advisable to always use the iframe configuration option.
Template for the content of a Window.
Enables (true) or disables (false) the ability for users to move/drag a
Window.
Explicitly states whether content iframe should be created.
The maximum height (in pixels) that may be achieved by resizing the window.
The maximum width (in pixels) that may be achieved by resizing the window.
The minimum height (in pixels) that may be achieved by resizing the window.
The minimum width (in pixels) that may be achieved by resizing the window.
Specifies whether the window should show a modal overlay over the page.
Enables (true) or disables (false) the ability for users to resize a
Window.
The text in the window title bar. If false, the window will be displayed without a title bar. Note that this will prevent the window from being dragged, and the window titlebar buttons will not be shown.
Specifies whether the window will be initially visible.
Specifies width of the window.
Specifies height of the window.
Centers a Window within the viewport.
Example
var kendoWindow = $("#window").data("kendoWindow");
kendoWindow.center();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Closes a Window.
Close a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").close();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Gets or set the content of a Window.
Get the existing content of the Window
var kendoWindow = $("#window").data("kendoWindow");
var windowContent = kendoWindow.content();
Set the content of a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").content("Kendo UI for all the things!");
Parameters
- content
String _optional, default: _
The content of the Window.
Returns
kendo.ui.Window If content is provided, this method will return the (Kendo UI) Window object to support chaining. Otherwise,
it will return the current content of the (Kendo UI) Window.
Destroys the window and its modal overlay, if necessary. Removes the Window HTML elements from the DOM.
Maximizes a Window to the entire viewing area of the user agent. Triggers the resize event.
Maximize a Window
$("#window").data("kendoWindow").maximize();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Maximizes a Window to its title bar.
Minimize a Window
$("#window").data("kendoWindow").minimize();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Opens a Window.
Open a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").open();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Refreshes the content of a Window from a remote URL.
Example
var windowObject = $("#window").data("kendoWindow");
windowObject.refresh("/feedbackForm");
windowObject.refresh({
url: "/feedbackForm",
data: { userId: 42 }
});
windowObject.refresh({
url: "/userInfo",
data: { userId: 42 },
template: "Hello, #= firstName # #= lastName #"
});
Parameters
- options
Object|String Options for requesting data from the server.
If omitted, the window uses the content property
that was supplied when the window was created.
Any options specified here are passed to jQuery.ajax().
- options.url
String The server URL that will be requested.
- options.data
Object A JSON object containing the data that will be passed to the server.
- options.type
String The HTTP request method ("GET", "POST").
- options.template
String A template to be used for displaying the requested data.
- options.iframe
Boolean Indicates whether the content should be fetched within an iframe, or with AJAX and rendered in the same page.
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Restores a maximized or minimized Window to its previous state. Triggers the resize event.
Restore the state of a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").restore();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Allows the window to be configured with new options.
Set new dimensions to the window
var kendoWindow = $("#window").data("kendoWindow");
kendoWindow.setOptions({
width: 180,
height: 225
});
Gets or set the title of a Window.
Get the existing title of the Window
var kendoWindow = $("#window").data("kendoWindow");
var windowTitle = kendoWindow.title();
Set the title of a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").title("Do a barrel roll!");
Parameters
- text
String _optional, default: _
The title of the Window.
Returns
kendo.ui.Window If a title is provided, this method will return the (Kendo UI) Window object to support chaining. Otherwise,
it will return the current title of the (Kendo UI) Window.
Brings forward a Window to the top of the z-index.
Bring forward a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").toFront();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Toggles a Window between a maximized and restored state. Triggers the resize event.
Toggle the state of a Window; utilize chaining (if necessary)
var kendoWindow = $("#window").data("kendoWindow").toggleMaximization();
Returns
kendo.ui.Window Returns the (Kendo UI) Window object to support chaining.
Triggered when a Window has finished its opening animation.
Triggered when a Window is closed (by a user or through the close() method).
Triggered when a Window has finished its closing animation.
Triggered when a Window has been moved by a user.
Triggered when the user starts to move the window.
Triggered when an AJAX request for content fails.
Arguments
- xhr
jqXHR The XHR request object, as returned from jQuery.ajax
- status
String The status of the request, as returned from jQuery.ajax
Triggered when a Window is opened (i.e. the open() method is called).
Triggered when the content of a Window has finished loading via AJAX,
when the window iframe has finished loading, or when the refresh button
has been clicked on a window with static content.
Triggered when a Window has been resized by a user.