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

Provides a fluent interface for configuring FileManager data sources.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TModel

The type of the data model.

Syntax:

C#
public class FileManagerDataSourceBuilder<TModel> where TModel : class

Inheritance: objectFileManagerDataSourceBuilder<TModel>

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

Constructors

C#
public FileManagerDataSourceBuilder(DataSource dataSource, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:dataSourceDataSourceviewContextViewContexturlGeneratorIUrlGenerator

Methods

Configures the URL for Create operation.

C#
public FileManagerDataSourceBuilder<TModel> Create(Action<CrudOperationBuilder> configurator)
Parameters:configuratorAction<CrudOperationBuilder>

Configures the Create operation for the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Create(operation =&gt; operation
.Type(HttpVerbs.Post)
.Action("Create", "FileManagerData")
);
})
)

Sets controller, action and routeValues for Create operation.

C#
public FileManagerDataSourceBuilder<TModel> Create(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

routeValuesobject

Route values

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Create("Create", "FileManagerData", new { id = 1 });
})
)

Sets controller and action for Create operation.

C#
public FileManagerDataSourceBuilder<TModel> Create(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Create(operation =&gt; operation
.Type(HttpVerbs.Post)
.Action("Create", "FileManagerData")
);
})
)

Use it to configure Custom binding.

C#
public CustomFileManagerDataSourceBuilder Custom()
Returns:

CustomFileManagerDataSourceBuilder

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt; dataSource
.Custom()
.Transport(transport =&gt; transport
.Read("Read", "FileManagerData")
)
})
)

Configures the URL for Destroy operation.

C#
public FileManagerDataSourceBuilder<TModel> Destroy(Action<CrudOperationBuilder> configurator)
Parameters:configuratorAction<CrudOperationBuilder>

Configures the Destroy operations of the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Destroy(operation =&gt; operation
.Type(HttpVerbs.Post)
.Action("Destroy", "FileManagerData")
);
})
)

Sets controller, action and routeValues for Destroy operation.

C#
public FileManagerDataSourceBuilder<TModel> Destroy(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

routeValuesobject

Route values

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Destroy("Destroy", "FileManagerData", new { id = 1 });
})
)

Sets controller and action for Destroy operation.

C#
public FileManagerDataSourceBuilder<TModel> Destroy(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Destroy("Destroy", "FileManagerData");
})
)

Configures the client-side events

C#
public FileManagerDataSourceBuilder<TModel> Events(Action<DataSourceEventBuilder> configurator)
Parameters:configuratorAction<DataSourceEventBuilder>

Configures the events of the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData");
})
.Events(events =&gt; events.RequestStart("onRequestStart"))
)

Configures the model

C#
public FileManagerDataSourceBuilder<TModel> Model(Action<FileManagerModelDescriptorBuilder<object>> configurator)
Parameters:configuratorAction<FileManagerModelDescriptorBuilder<object>>

Configures the DataSource's model.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData");
})
.Model(model =&gt; model
.Field("name")
.DefaultValue("N/A")
)
)

Configures the URL for Read operation.

C#
public FileManagerDataSourceBuilder<TModel> Read(Action<CrudOperationBuilder> configurator)
Parameters:configuratorAction<CrudOperationBuilder>Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read(operation =&gt; operation
.Type(HttpVerbs.Post)
.Action("Read", "FileManagerData")
);
})
)

Sets controller, action and routeValues for Read operation.

C#
public FileManagerDataSourceBuilder<TModel> Read(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

routeValuesobject

Route values

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData", new { id = 1 });
})
)

Sets controller and action for Read operation.

C#
public FileManagerDataSourceBuilder<TModel> Read(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData");
})
)

Specifies if filtering should be handled by the server.

C#
public FileManagerDataSourceBuilder<TModel> ServerFiltering()
Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData");
})
.ServerFiltering()
)

Specifies if filtering should be handled by the server.

C#
public FileManagerDataSourceBuilder<TModel> ServerFiltering(bool enabled)
Parameters:enabledbool

Specifies if server filtering is enabled.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Read("Read", "FileManagerData");
})
.ServerFiltering(false)
)
C#
protected virtual void SetOperationUrl(CrudOperation operation, string actionName, string controllerName, object routeValues)
Parameters:operationCrudOperationactionNamestringcontrollerNamestringrouteValuesobject

Use it to configure SignalR binding.

C#
public SignalRHierarchicalDataSourceBuilder SignalR()
Returns:

SignalRHierarchicalDataSourceBuilder

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt; dataSource
.SignalR()
.Transport(tr =&gt; tr
.Promise("hubStart")
.Hub("hub")
.Client(c =&gt; c
.Read("read"))
.Server(s =&gt; s
.Read("read"))
})
)

Configures the URL for Update operation.

C#
public FileManagerDataSourceBuilder<TModel> Update(Action<CrudOperationBuilder> configurator)
Parameters:configuratorAction<CrudOperationBuilder>

Configures the Update operation for the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Update(operation =&gt; operation
.Type(HttpVerbs.Post)
.Action("Update", "FileManagerData")
);
})
)

Sets controller, action and routeValues for Update operation.

C#
public FileManagerDataSourceBuilder<TModel> Update(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

routeValuesobject

Route values

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Update("Update", "FileManagerData", new { id = 1 });
})
)

Sets controller and action for Update operation.

C#
public FileManagerDataSourceBuilder<TModel> Update(string actionName, string controllerName)
Parameters:actionNamestring

Action name

controllerNamestring

Controller Name

Returns:

FileManagerDataSourceBuilder<TModel>

Example:
C#
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(dataSource =&gt;
{
dataSource.Update("Update", "FileManagerData");
})
)