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

Defines the fluent API for configuring the GanttResourcesSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class GanttResourcesSettingsBuilder

Inheritance: objectGanttResourcesSettingsBuilder

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

Constructors

C#
public GanttResourcesSettingsBuilder(GanttResourcesSettings settings, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:settingsGanttResourcesSettingsviewContextViewContexturlGeneratorIUrlGenerator

Methods

Binds the gantt resources to a list of objects

C#
public GanttResourcesSettingsBuilder BindTo(IEnumerable dataSource)
Parameters:dataSourceIEnumerable

The dataSource

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Resources(r=> r.BindTo(EnumerableCollection))
)

The field of the resource data item which contains the resource color.

C#
public GanttResourcesSettingsBuilder DataColorField(string value)
Parameters:valuestring

The value that configures the datacolorfield.

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Resources(r=> r.DataColorField("Field"))
)

The field of the resource data item containing the format of the resource value, which could be assigned to a gantt task. The data item format value could be any valid kendo format.

C#
public GanttResourcesSettingsBuilder DataFormatField(string value)
Parameters:valuestring

The value that configures the dataformatfield.

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Resources(r=> r.DataFormatField("Field"))
)

The data source which contains resource data items. Can be a JavaScript object which represents a valid data source configuration, a JavaScript array or an existing kendo.data.DataSource instance. If the dataSource option is set to a JavaScript object or array, the component will initialize a new kendo.data.DataSource instance using that value as data source configuration.If the dataSource option is an existing kendo.data.DataSource instance the component will use that instance and will not initialize a new one.

C#
public GanttResourcesSettingsBuilder DataSource(Action<ReadOnlyAjaxDataSourceBuilder<object>> configurator)
Parameters:configuratorAction<ReadOnlyAjaxDataSourceBuilder<object>>

The value that configures the datasource.

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Resources(r=&gt; r.DataSource(ds =&gt;
ds.Read("ActionName","ControllerName")
))
)

The field of the resource data item which represents the resource text.

C#
public GanttResourcesSettingsBuilder DataTextField(string value)
Parameters:valuestring

The value that configures the datatextfield.

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Resources(r=&gt; r.DataTextField("Field"))
)

The field of the gantt task which contains the assigned resource objects.

C#
public GanttResourcesSettingsBuilder Field(string value)
Parameters:valuestring

The value that configures the field.

Returns:

GanttResourcesSettingsBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Resources(r=&gt; r.Field("Field"))
)