UploadEventBuilder

Methods

Cancel(System.String)

Defines the handler of the Cancel client-side event. Fires when the upload was cancelled while in progress.

For more information see Cancel event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Cancel("onCancel"))
            )
             

Cancel(System.Func)

Defines the handler of the Cancel client-side event. Fires when the upload was cancelled while in progress.

For more information see Cancel event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Cancel(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Clear(System.String)

Defines the handler of the Clear client-side event. Fires when the files are cleared by clicking on the Clear button.

For more information see Clear event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Clear("onClear"))
            )
             

Clear(System.Func)

Defines the handler of the Clear client-side event. Fires when the files are cleared by clicking on the Clear button.

For more information see Clear event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Clear(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Complete(System.String)

Defines the handler of the Complete client-side event. Fires when all active uploads complete—either successfully or with errors.

For more information see Complete event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Complete("onComplete"))
            )
             

Complete(System.Func)

Defines the handler of the Complete client-side event. Fires when all active uploads complete—either successfully or with errors.

For more information see Complete event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Complete(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Error(System.String)

Defines the handler of the Error client-side event. Fires when an upload or remove operation fails.

For more information see Error event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Error("onError"))
            )
             

Error(System.Func)

Defines the handler of the Error client-side event. Fires when an upload or remove operation fails.

For more information see Error event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Error(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Pause(System.String)

Defines the handler of the Pause client-side event. Fires when the files are cleared by clicking the Pause button. The button is visible if chunksize is set.

For more information see Pause event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Pause("onPause"))
            )
             

Pause(System.Func)

Defines the handler of the Pause client-side event. Fires when the files are cleared by clicking the Pause button. The button is visible if chunksize is set.

For more information see Pause event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Pause(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Progress(System.String)

Defines the handler of the Progress client-side event. Fires when the data about the progress of the upload is available.

For more information see Progress event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Progress("onProgress"))
            )
             

Progress(System.Func)

Defines the handler of the Progress client-side event. Fires when the data about the progress of the upload is available.

For more information see Progress event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Progress(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Resume(System.String)

Defines the handler of the Resume client-side event. Fires when the files are resumed through clicking the Resume button. The button is visible if chunksize is set and the file upload is paused.

For more information see Resume event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Resume("onResume"))
            )
             

Resume(System.Func)

Defines the handler of the Resume client-side event. Fires when the files are resumed through clicking the Resume button. The button is visible if chunksize is set and the file upload is paused.

For more information see Resume event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Resume(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Remove(System.String)

Defines the handler of the Remove client-side event. Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented.

For more information see Remove event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Remove("onRemove"))
            )
             

Remove(System.Func)

Defines the handler of the Remove client-side event. Fires when an uploaded file is about to be removed. If the event is canceled, the remove operation is prevented.

For more information see Remove event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Remove(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Select(System.String)

Defines the handler of the Select client-side event. Fires when a file is selected.

For more information see Select event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Select("onSelect"))
            )
             

Select(System.Func)

Defines the handler of the Select client-side event. Fires when a file is selected.

For more information see Select event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Select(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Success(System.String)

Defines the handler of the Success client-side event. Fires when an upload or remove operation is completed successfully.

For more information see Success event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Success("onSuccess"))
            )
             

Success(System.Func)

Defines the handler of the Success client-side event. Fires when an upload or remove operation is completed successfully.

For more information see Success event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Success(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )
             

Upload(System.String)

Defines the handler of the Upload client-side event. Fires when one or more files are about to be uploaded. The canceling of the event prevents the upload.

For more information see Upload event.

Parameters

handler - System.String

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

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                        .Name("Upload")
                        .Events(events => events.Upload("onUpload"))
            )
             

Upload(System.Func)

Defines the handler of the Upload client-side event. Fires when one or more files are about to be uploaded. The canceling of the event prevents the upload.

For more information see Upload event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of UploadEventBuilder .

Example

Razor
 
            @( Html.Kendo().Upload()
                       .Name("Upload")
                       .Events(events => events.Success(
                            @<text>
                            function(e) {
                                //event handling code
                            }
                            </text>
                       ))
            )