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

Defines the fluent API for operation configuring of the FileBrowser.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorFileBrowserOperationBuilder

Inheritance: objectEditorFileBrowserOperationBuilder

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

Constructors

C#
public EditorFileBrowserOperationBuilder(EditorFileBrowserOperation operation, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:operationEditorFileBrowserOperationviewContextViewContexturlGeneratorIUrlGenerator

Methods

Sets the action, contoller and route values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Action(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller name

routeValuesobject

Route values

Returns:

EditorFileBrowserOperationBuilder

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

Sets the action, contoller and route values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Action(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller name

routeValuesRouteValueDictionary

Route values

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home", new RouteValueDictionary { { "id", ViewData["id"] } }))
)
)

Sets the action and contoller values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Action(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller name

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home"))
)
)
C#
public EditorFileBrowserOperationBuilder Data(string handler)
Parameters:handlerstringReturns:

EditorFileBrowserOperationBuilder

Sets the route values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Route(RouteValueDictionary routeValues)
Parameters:routeValuesRouteValueDictionary

Route values

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home").Route(new RouteValueDictionary { { "id", ViewData["id"] } }))
)
)

Sets the route name and values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Route(string routeName, object routeValues)
Parameters:routeNamestring

Route name

routeValuesobject

Route values

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home").Route("Default", new { id = ViewData["id"] }))
)
)

Sets the route name and values for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Route(string routeName, RouteValueDictionary routeValues)
Parameters:routeNamestring

Route name

routeValuesRouteValueDictionary

Route values

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home").Route("Default", new RouteValueDictionary { { "id", ViewData["id"] } }))
)
)

Sets the route name for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Route(string routeName)
Parameters:routeNamestringReturns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Action("ReadFiles","Home").Route("Default"))
)
)

Specifies an absolute or relative URL for the file browser operation.

C#
public EditorFileBrowserOperationBuilder Url(string url)
Parameters:urlstring

Absolute or relative URL for the operation

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(fileBrowser => fileBrowser
.Read(read => read.Url("/Home/ReadFiles"))
)
)

Sets a JavaScript function or the name of a function that returns the URL for the image.

C#
public EditorFileBrowserOperationBuilder UrlHandler(string handler)
Parameters:handlerstring

The JavaScript function name

Returns:

EditorFileBrowserOperationBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.FileBrowser(imageBrowser => imageBrowser
.File(file => file.UrlHandler("getFileUrl"))
.Read("Read", "FileBrowser")
)
)