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

Defines the fluent API for configuring the GanttAssignmentsSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TAssingmentModel

Syntax:

C#
public class GanttAssignmentsSettingsBuilder<TAssingmentModel> where TAssingmentModel : class

Inheritance: objectGanttAssignmentsSettingsBuilder<TAssingmentModel>

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

Constructors

C#
public GanttAssignmentsSettingsBuilder(GanttAssignmentsSettings settings, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:settingsGanttAssignmentsSettingsviewContextViewContexturlGeneratorIUrlGenerator

Methods

Binds the gantt assignments to a list of objects

C#
public GanttAssignmentsSettingsBuilder<TAssingmentModel> BindTo(IEnumerable dataSource)
Parameters:dataSourceIEnumerable

The dataSource

Returns:

GanttAssignmentsSettingsBuilder<TAssingmentModel>

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Assignments&lt;ResourceAssignmentViewModel&gt;(a =&gt; a
.BindTo(EnumerableCollection)
)
)

The field of the assignment data item which represents the resource id.

C#
public GanttAssignmentsSettingsBuilder<TAssingmentModel> DataResourceIdField(string value)
Parameters:valuestring

The value that configures the dataresourceidfield.

Returns:

GanttAssignmentsSettingsBuilder<TAssingmentModel>

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Assignments&lt;ResourceAssignmentViewModel&gt;(a =&gt; a
.DataResourceIdField("ResourceID")
)
)

The data source which contains assignment 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 GanttAssignmentsSettingsBuilder<TAssingmentModel> DataSource(Action<GanttAssignmentsDataSourceBuilder<TAssingmentModel>> configurator)
Parameters:configuratorAction<GanttAssignmentsDataSourceBuilder<TAssingmentModel>>

The value that configures the datasource.

Returns:

GanttAssignmentsSettingsBuilder<TAssingmentModel>

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Assignments&lt;ResourceAssignmentViewModel&gt;(a =&gt; a
.DataTaskIdField("TaskID")
.DataResourceIdField("ResourceID")
.DataValueField("Units")
.DataSource(d =&gt; d
.Model(m =&gt;
{
m.Id(f =&gt; f.ID);
})
.Read("Read_Assignments", "Gantt")
.Create("Create_Assignment", "Gantt")
.Destroy("Destroy_Assignment", "Gantt")
.Update("Update_Assignment", "Gantt")
)
)
)

The field of the assignment data item which represents the task id.

C#
public GanttAssignmentsSettingsBuilder<TAssingmentModel> DataTaskIdField(string value)
Parameters:valuestring

The value that configures the datataskidfield.

Returns:

GanttAssignmentsSettingsBuilder<TAssingmentModel>

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Assignments&lt;ResourceAssignmentViewModel&gt;(a =&gt; a
.DataTaskIdField("TaskID")
)
)

The field of the assignment data item which represents the amount of the assigned resource.

C#
public GanttAssignmentsSettingsBuilder<TAssingmentModel> DataValueField(string value)
Parameters:valuestring

The value that configures the datavaluefield.

Returns:

GanttAssignmentsSettingsBuilder<TAssingmentModel>

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Assignments&lt;ResourceAssignmentViewModel&gt;(a =&gt; a
.DataValueField("Units")
)
)