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

Defines the fluent interface for configuring the Window events.

Definition

Constructors

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

Methods

Defines the name of the JavaScript function that will handle the Activate client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Activate client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Close client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Close client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Deactivate client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Deactivate client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the DragEnd client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the DragEnd client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the DragStart client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the DragStart client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Error client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Error client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the inline handler of the KendoKeydown client-side event

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

WindowEventBuilder

Defines the name of the JavaScript function that will handle the KendoKeydown client-side event.

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

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

Returns:

WindowEventBuilder

Defines the name of the JavaScript function that will handle the Maximize client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Maximize client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Minimize client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Minimize client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Open client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Open client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Refresh client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Refresh client-side event.

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

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

Returns:

WindowEventBuilder

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

Defines the name of the JavaScript function that will handle the Resize client-side event.

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

The handler code wrapped in a text tag (Razor syntax).

Returns:

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 name of the JavaScript function that will handle the Resize client-side event.

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

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

Returns:

WindowEventBuilder

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

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 (Razor syntax).

Returns:

WindowEventBuilder

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

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 event.

Returns:

WindowEventBuilder

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