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

EditorImportSettingsBuilder

Methods

AllowedExtensions(System.String[])

Lists which file extensions are allowed to be uploaded. Recognizes entries of both .type and type values.

Parameters

value - System.String[]

The string array of allowed file extensions.

Example


             @( Html.Kendo().Editor()
               .Name("Editor")
               .Import(import => import
                 .AllowedExtensions(new[] { "docx", "rtf", "html", "txt" })
               )
             )

MaxFileSize(System.Nullable)

Defines the maximum file size that can be uploaded in bytes.

Parameters

value - System.Nullable<Double>

The value that configures the maximum file size.

Example


             @( Html.Kendo().Editor()
               .Name("Editor")
               .Import(import => import
                 .MaxFileSize(104857600)
               )
             )

Proxy(System.String,System.String)

Sets the action and controller for the import operation

Parameters

actionName - System.String

Name of the action.

controllerName - System.String

Name of the controller.

Example


             @( Html.Kendo().Editor()
                        .Name("Editor")
                        .Import(import => import
                            .Proxy("EditorImport", "Home");
                        )
            )

Proxy(System.Linq.Expressions.Expression)

Sets the action for the import operation

Parameters

controllerAction - System.Linq.Expressions.Expression<Action>

The action.

Example


             @( Html.Kendo().Editor()
                        .Name("Editor")
                        .Import(import => import
                            .Proxy<HomeController>(controller => controller.Import())
                        )
            )

Error(System.Func)

Defines the inline handler of the Error client-side event

Parameters

inlineCodeBlock - System.Func<Object,Object>

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Error(@<text>function(e){ console.log(e.files[0].name); }</text>)
                     )
            )         

Error(System.String)

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

Parameters

onErrorHandlerName - System.String

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Error("onError")
                     )
            )         

Complete(System.Func)

Defines the inline handler of the Complete client-side event

Parameters

inlineCodeBlock - System.Func<Object,Object>

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Complete(@<text>function(e){ console.log(e); }</text>)
                     )
            )         

Complete(System.String)

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

Parameters

onCompleteHandlerName - System.String

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Complete("onComplete")
                     )
                 )    

Select(System.Func)

Defines the inline handler of the Select client-side event

Parameters

inlineCodeBlock - System.Func<Object,Object>

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Select(@<text>function(e){ console.log(e); }</text>)
                     )
                 )    

Select(System.String)

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

Parameters

onSelectHandlerName - System.String

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Select("onSelect")
                     )
                 )    

Success(System.Func)

Defines the inline handler of the Success client-side event

Parameters

inlineCodeBlock - System.Func<Object,Object>

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Success(@<text>function(e){ console.log(e); }</text>)
                     )
                 )    

Success(System.String)

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

Parameters

onSuccessHandlerName - System.String

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Success("onSuccess")
                     )
                 )    

Progress(System.Func)

Defines the inline handler of the Progress client-side event

Parameters

inlineCodeBlock - System.Func<Object,Object>

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Progress(@<text>function(e){ console.log(e); }</text>)
                     )
                 )    

Progress(System.String)

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

Parameters

onProgressHandlerName - System.String

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

Example


                @( Html.Kendo().Editor()
                    .Name("Editor")
                    .Import(import => import
                            .Progress("onProgress")
                     )
                 )    

In this article
Not finding the help you need?