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

Defines the fluent interface for configuring the Upload events.

Definition

Constructors

Initializes a new instance of the UploadEventBuilder class.

C#
public UploadEventBuilder(IDictionary<string, object> clientEvents)
Parameters:clientEventsIDictionary<string, object>

The client events.

Methods

Defines the inline handler of the Cancel client-side event.

C#
public UploadEventBuilder Cancel(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Cancel(string onCancelHandlerName)
Parameters:onCancelHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Cancel("onCancel"))
)

Defines the inline handler of the Clear client-side event.

C#
public UploadEventBuilder Clear(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Clear(string onClearHandlerName)
Parameters:onClearHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Clear("onClear"))
)

Defines the inline handler of the Complete client-side event.

C#
public UploadEventBuilder Complete(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Complete(string onCompleteHandlerName)
Parameters:onCompleteHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Complete("onComplete"))
)

Defines the inline handler of the Error client-side event.

C#
public UploadEventBuilder Error(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.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 UploadEventBuilder Error(string onErrorHandlerName)
Parameters:onErrorHandlerNamestring

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

Returns:

UploadEventBuilder

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

Defines the inline handler of the Pause client-side event.

C#
public UploadEventBuilder Pause(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Pause(string onPauseHandlerName)
Parameters:onPauseHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Pause("onPause"))
)

Defines the inline handler of the Progress client-side event.

C#
public UploadEventBuilder Progress(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Progress(string onProgressHandlerName)
Parameters:onProgressHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Progress("onProgress"))
)

Defines the inline handler of the Remove client-side event.

C#
public UploadEventBuilder Remove(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Remove(string onRemoveHandlerName)
Parameters:onRemoveHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Remove("onRemove"))
)

Defines the inline handler of the Resume client-side event.

C#
public UploadEventBuilder Resume(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Resume(string onResumeHandlerName)
Parameters:onResumeHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Resume("onResume"))
)

Defines the inline handler of the Select client-side event

C#
public UploadEventBuilder Select(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

Triggered when a file is selected. Note: Canceling this event will prevent the selection from\n\t\t/// occurring.

C#
public UploadEventBuilder Select(string onSelectHandlerName)
Parameters:onSelectHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Select("onSelect"))
)

Defines the inline handler of the Success client-side event.

C#
public UploadEventBuilder Success(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Success(string onSuccessHandlerName)
Parameters:onSuccessHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Success("onSuccess"))
)

Defines the inline handler of the Upload client-side event

C#
public UploadEventBuilder Upload(Func<object, object> inlineCodeBlock)
Parameters:inlineCodeBlockFunc<object, object>

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

Returns:

UploadEventBuilder

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

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

C#
public UploadEventBuilder Upload(string onUploadHandlerName)
Parameters:onUploadHandlerNamestring

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

Returns:

UploadEventBuilder

Example:
C#
@( Html.Kendo().Upload()
.Name("Upload")
.Events(events =&gt; events.Upload("onUpload"))
)