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

GanttResourcesSettingsBuilder

Methods

DataFormatField(System.String)

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.

Parameters

value - System.String

The value for DataFormatField

Example


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

DataColorField(System.String)

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

Parameters

value - System.String

The value for DataColorField

Example


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

DataTextField(System.String)

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

Parameters

value - System.String

The value for DataTextField

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Resources(r=> r.DataTextField("Field"))
            )

Field(System.String)

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

Parameters

value - System.String

The value for Field

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Resources(r=> r.Field("Field"))
            )

DataSource(System.Action)

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.

Parameters

configurator - System.Action<ReadOnlyAjaxDataSourceBuilder>

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Resources(r=> r.DataSource(ds =>
                     ds.Read("ActionName","ControllerName")
                 ))
            )

BindTo(System.Collections.IEnumerable)

Binds the gantt resources to a list of objects

Parameters

dataSource - System.Collections.IEnumerable

The dataSource

Example


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

In this article
Not finding the help you need?