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

Defines the fluent API for configuring the FileBrowser.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorFileBrowserSettingsBuilder

Inheritance: objectEditorFileBrowserSettingsBuilder

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

Constructors

Initializes a new instance of the EditorFileBrowserSettingsBuilder class.

C#
public EditorFileBrowserSettingsBuilder(EditorFileBrowserSettings settings, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:settingsEditorFileBrowserSettings

The File Browser settings.

viewContextViewContext

The view context

urlGeneratorIUrlGenerator

The URL generator.

Methods

Configures the URL for directory create operation.

C#
public EditorFileBrowserSettingsBuilder Create(Action<EditorFileBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorFileBrowserOperationBuilder>

The action which configures the Create Action.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Create(create =&gt; create.Action("CreateDirectory","Home"))
)
)

Sets the Action, Controller, and routeValues for directory create operation.

C#
public EditorFileBrowserSettingsBuilder Create(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Create("CreateDirectory","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for directory create operation.

C#
public EditorFileBrowserSettingsBuilder Create(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Create("CreateDirectory","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the directory creation.

C#
public EditorFileBrowserSettingsBuilder Create(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Create("CreateDirectory","Home")
)
)

Configures the URL for the file or directory destroy operation.

C#
public EditorFileBrowserSettingsBuilder Destroy(Action<EditorFileBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorFileBrowserOperationBuilder>

The action which configures the Destroy Action.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Destroy(destroy =&gt; destroy.Action("Delete","Home"))
)
)

Sets the Action, Controller, and routeValues for file or directory destroy operation.

C#
public EditorFileBrowserSettingsBuilder Destroy(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Destroy("Destroy","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for file or directory destroy operation.

C#
public EditorFileBrowserSettingsBuilder Destroy(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Destroy("Destroy","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the file or directory deletion.

C#
public EditorFileBrowserSettingsBuilder Destroy(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Destroy("Delete","Home")
)
)

Configures the URL for serving the original file.

C#
public EditorFileBrowserSettingsBuilder File(Action<EditorFileBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorFileBrowserOperationBuilder>

The action which configures the File Action.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.File(file =&gt; file.Action("File","Home"))
)
)

Sets the Action, Controller, and routeValues responsible for serving the original file.

C#
public EditorFileBrowserSettingsBuilder File(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.File("File","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues responsible for serving the original file.

C#
public EditorFileBrowserSettingsBuilder File(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.File("File","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller responsible for serving the original file.

C#
public EditorFileBrowserSettingsBuilder File(string actionName, string controllerName)
Parameters:actionNamestring

The name of the Action.

controllerNamestring

The name of the Controller.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.File("File","Home")
)
)

Sets the URL responsible for serving the original file. A file name placeholder should be specified. By default the placeholder value is URL encoded. If this is not desired, use a function.

C#
public EditorFileBrowserSettingsBuilder File(string url)
Parameters:urlstring

The string URL.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.File("~/shared/UserFiles/Images/{0}")
)
)

Defines the allowed file extensions. Default: "."

C#
public EditorFileBrowserSettingsBuilder FileTypes(string value)
Parameters:valuestring

The file types.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.FileTypes("*.zip")
)
)

Configures the URL for remote file read operation.

C#
public EditorFileBrowserSettingsBuilder Read(Action<EditorFileBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorFileBrowserOperationBuilder>

The action which configures the Read Action.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Read(read =&gt; read.Action("ReadFiles","Home"))
)
)

Sets the Action, Controller, and routeValues for remote file retrieval.

C#
public EditorFileBrowserSettingsBuilder Read(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

The name of the Action.

controllerNamestring

The name of the Controller.

routeValuesobject

The route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Read("ReadFiles","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for remote file retrieval.

C#
public EditorFileBrowserSettingsBuilder Read(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

The name of the Action.

controllerNamestring

The name of the Controller.

routeValuesRouteValueDictionary

The route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Read("ReadFiles","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller for remote file retrieval.

C#
public EditorFileBrowserSettingsBuilder Read(string actionName, string controllerName)
Parameters:actionNamestring

The name of the Action.

controllerNamestring

The name of the Controller.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Read("ReadFiles","Home")
)
)

Configures the URL for files uplaod operation.

C#
public EditorFileBrowserSettingsBuilder Upload(Action<EditorFileBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorFileBrowserOperationBuilder>

The action which configures the Upload Action.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Upload(upload =&gt; upload.Action("UploadFiles","Home"))
)
)

Sets the Action, Controller, and routeValues for uploading new files.

C#
public EditorFileBrowserSettingsBuilder Upload(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Upload("UploadFiles","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for uploading new files.

C#
public EditorFileBrowserSettingsBuilder Upload(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Upload("UploadFiles","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the new files upload.

C#
public EditorFileBrowserSettingsBuilder Upload(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorFileBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser =&gt; fileBrowser
.Upload("UploadFiles","Home")
)
)