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

GanttAssignmentsSettingsBuilder

Methods

DataResourceIdField(System.String)

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

Parameters

value - System.String

The value for DataResourceIdField

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Assignments<ResourceAssignmentViewModel>(a => a
                    .DataResourceIdField("Field")
                )
            )

DataTaskIdField(System.String)

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

Parameters

value - System.String

The value for DataTaskIdField

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Assignments<ResourceAssignmentViewModel>(a => a
                    .DataTaskIdField("Field")
                )
            )

DataValueField(System.String)

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

Parameters

value - System.String

The value for DataValueField

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Assignments<ResourceAssignmentViewModel>(a => a
                    .DataValueField("Value")
                )
            )

DataSource(System.Action)

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.

Parameters

configurator - System.Action<GanttAssignmentsDataSourceBuilder>

The action that configures the datasource.

Example


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

BindTo(System.Collections.IEnumerable)

Binds the gantt assignments to a list of objects

Parameters

dataSource - System.Collections.IEnumerable

The dataSource

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Assignments<ResourceAssignmentViewModel>(a => a
                    .BindTo(EnumerableCollection)
                )
            )

In this article
Not finding the help you need?