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

Defines the fluent API for configuring the EditorImportSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorImportSettingsBuilder

Inheritance: objectEditorImportSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public EditorImportSettingsBuilder(EditorImportSettings settings)
Parameters:settingsEditorImportSettings

Methods

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

C#
public EditorImportSettingsBuilder AllowedExtensions(string[] value)
Parameters:valuestring[]

The string array of allowed file extensions.

Returns:

EditorImportSettingsBuilder

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

Defines the inline handler of the Complete client-side event

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Complete(@&lt;text&gt;function(e){ console.log(e); }&lt;/text&gt;)
)
)

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

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Complete("onComplete")
)
)

Defines the inline handler of the Error client-side event

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Error(@&lt;text&gt;function(e){ console.log(e.files[0].name); }&lt;/text&gt;)
)
)

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

C#
public EditorImportSettingsBuilder Error(string onErrorHandlerName)
Parameters:onErrorHandlerNamestring

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Error("onError")
)
)

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

C#
public EditorImportSettingsBuilder MaxFileSize(double? value)
Parameters:valuedouble?

The value that configures the maximum file size.

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.MaxFileSize(104857600)
)
)

Defines the inline handler of the Progress client-side event

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Progress(@&lt;text&gt;function(e){ console.log(e); }&lt;/text&gt;)
)
)

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

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Progress("onProgress")
)
)

Sets the action and controller for the import operation

C#
public EditorImportSettingsBuilder Proxy(string actionName, string controllerName)
Parameters:actionNamestring

Name of the action.

controllerNamestring

Name of the controller.

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Proxy("EditorImport", "Home");
)
)

Sets the action for the import operation

C#
public EditorImportSettingsBuilder Proxy<TController>(Expression<Action<TController>> controllerAction) where TController : Controller
Parameters:controllerActionExpression<Action<TController>>

The action.

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Proxy&lt;HomeController&gt;(controller =&gt; controller.Import())
)
)

Defines the inline handler of the Select client-side event

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Select(@&lt;text&gt;function(e){ console.log(e); }&lt;/text&gt;)
)
)

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

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Select("onSelect")
)
)

Defines the inline handler of the Success client-side event

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Success(@&lt;text&gt;function(e){ console.log(e); }&lt;/text&gt;)
)
)

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

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

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

Returns:

EditorImportSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Import(import =&gt; import
.Success("onSuccess")
)
)