New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI Window for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the WindowEventBuilder class.

C#
public WindowEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Window event handlers.

Methods

Defines the handler of the Activate client-side event. Triggered when a Window has finished its opening animation.

C#
public WindowEventBuilder Activate(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Activate(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Activate client-side event. Triggered when a Window has finished its opening animation.

C#
public WindowEventBuilder Activate(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Activate event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Activate("onActivate"))
)

Defines the handler of the Close client-side event. Triggered when a Window is closed either by the user or through the close() method.

C#
public WindowEventBuilder Close(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Defines the handler of the Close client-side event. Triggered when a Window is closed either by the user or through the close() method.

C#
public WindowEventBuilder Close(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Close event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Defines the handler of the Deactivate client-side event. Triggered when a Window has finished its closing animation.

C#
public WindowEventBuilder Deactivate(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Deactivate(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Deactivate client-side event. Triggered when a Window has finished its closing animation.

C#
public WindowEventBuilder Deactivate(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Deactivate event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Deactivate("onDeactivate"))
)

Defines the handler of the DragEnd client-side event. Triggered when a Window has been moved by the user.

C#
public WindowEventBuilder DragEnd(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.DragEnd(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the DragEnd client-side event. Triggered when a Window has been moved by the user.

C#
public WindowEventBuilder DragEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragEnd event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.DragEnd("onDragEnd"))
)

Defines the handler of the DragStart client-side event. Triggered when the user starts to move the Window.

C#
public WindowEventBuilder DragStart(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.DragStart(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the DragStart client-side event. Triggered when the user starts to move the Window.

C#
public WindowEventBuilder DragStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DragStart event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.DragStart("onDragStart"))
)

Defines the handler of the Error client-side event. Triggered when an Ajax request for content fails.

C#
public WindowEventBuilder Error(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Error(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Error client-side event. Triggered when an Ajax request for content fails.

C#
public WindowEventBuilder Error(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Error event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Error("onError"))
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Window is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public WindowEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Window is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public WindowEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Defines the handler of the Maximize client-side event. Triggered when the user maximizes the Window. Introduced in 2016.Q1.SP1.

C#
public WindowEventBuilder Maximize(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Maximize(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Maximize client-side event. Triggered when the user maximizes the Window. Introduced in 2016.Q1.SP1.

C#
public WindowEventBuilder Maximize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Maximize event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Maximize("onMaximize"))
)

Defines the handler of the Minimize client-side event. Triggered when the user minimizes the Window. Introduced in 2016.Q1.SP1.

C#
public WindowEventBuilder Minimize(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Minimize(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Minimize client-side event. Triggered when the user minimizes the Window. Introduced in 2016.Q1.SP1.

C#
public WindowEventBuilder Minimize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Minimize event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Minimize("onMinimize"))
)

Defines the handler of the Open client-side event. Triggered when a Window is opened, that is, when the open() method is called.

C#
public WindowEventBuilder Open(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Open(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Open client-side event. Triggered when a Window is opened, that is, when the open() method is called.

C#
public WindowEventBuilder Open(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Open event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Open("onOpen"))
)

Defines the handler of the Refresh client-side event. 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.

C#
public WindowEventBuilder Refresh(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Refresh(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Refresh client-side event. 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.

C#
public WindowEventBuilder Refresh(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Refresh event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Refresh("onRefresh"))
)

Defines the handler of the Resize client-side event. Triggered when the user resizes the Window.

C#
public WindowEventBuilder Resize(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Resize(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Resize client-side event. Triggered when the user resizes the Window.

C#
public WindowEventBuilder Resize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Resize event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Resize("onResize"))
)

Defines the handler of the Restore client-side event. Triggered when the Window is restored to its previous state(maximized or minimized) by pressing the restore button, or when the restore() method is called.

C#
public WindowEventBuilder Restore(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Restore(
@&lt;text&gt;
function(e) {
//event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Restore client-side event. Triggered when the Window is restored to its previous state(maximized or minimized) by pressing the restore button, or when the restore() method is called.

C#
public WindowEventBuilder Restore(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Restore event.

Returns:

WindowEventBuilder

Returns the current instance of WindowEventBuilder .

Example:
C#
@( Html.Kendo().Window()
.Name("Window")
.Events(events =&gt; events.Restore("onRestore"))
)