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

Defines the fluent interface for configuring the HierarchicalDataSource/>.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TModel

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

Initializes a new instance of the FileManagerDataSourceBuilder<TModel> class.

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 settings.

Returns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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

Use it to configure Custom binding.

C#
public CustomFileManagerDataSourceBuilder Custom()
Returns:

CustomFileManagerDataSourceBuilder

Returns a CustomFileManagerDataSourceBuilder instance for configuring the component's DataSource.

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 operation settings.

Returns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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 for the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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 Model of the DataSource.

Returns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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:enabledboolReturns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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

SetOperationUrl method.

C#
protected virtual void SetOperationUrl(CrudOperation operation, string actionName, string controllerName, object routeValues)
Parameters:operationCrudOperationactionNamestringcontrollerNamestringrouteValuesobject

Configures the URL for Update operation.

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

COnfigures the Update operation settings.

Returns:

FileManagerDataSourceBuilder<TModel>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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>

Returns the current FileManagerDataSourceBuilder<TModel> instance.

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