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

Defines the fluent API for configuring GanttColumn

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TTaskModel

TDependenciesModel

Syntax:

C#
public class GanttColumnBuilder<TTaskModel, TDependenciesModel> where TTaskModel : class, IGanttTask where TDependenciesModel : class, IGanttDependency

Inheritance: objectGanttColumnBuilder<TTaskModel, TDependenciesModel>

Derived Classes: GanttBoundColumnBuilder<TTaskModel, TDependenciesModel>GanttDraggableColumnBuilder<TTaskModel, TDependenciesModel>GanttGroupColumnBuilder<TTaskModel, TDependenciesModel>GanttResourceColumnBuilder<TTaskModel, TDependenciesModel>

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 GanttColumnBuilder<TTaskModel, TDependenciesModel> class.

C#
public GanttColumnBuilder(GanttColumn<TTaskModel, TDependenciesModel> container)
Parameters:containerGanttColumn<TTaskModel, TDependenciesModel>

Properties

Container

GanttColumn<TTaskModel, TDependenciesModel>

Container member.

C#
protected GanttColumn<TTaskModel, TDependenciesModel> Container { get; }

Methods

Specifies whether this column can be edited by the user.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Editable()
Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

Specifies whether this column can be edited by the user.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Editable(bool value)
Parameters:valuebool

The value for Editable

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true, the column will show the icons that are used for expanding and collapsing child rows. By default, the "title" column of the Gantt is expandable.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Expandable()
Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true, the column will show the icons that are used for expanding and collapsing child rows. By default, the "title" column of the Gantt is expandable.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Expandable(bool value)
Parameters:valuebool

The value for Expandable

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The field to which the column is bound. The value of this field is displayed by the column during data binding. The field name should be a valid Javascript identifier and should contain only alphanumeric characters (or "$" or "_"), and may not start with a digit.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Field(string value)
Parameters:valuestring

The value for Field

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true and if filtering is enabled for the entire Gantt, a filter menu will be displayed for this column. If set to false, the filter menu will not be displayed. By default, a filter menu is displayed for all columns when filtering is enabled through the filterable option. Can be set to a JavaScript object which represents the filter menu configuration.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Filterable(Action<GanttColumnFilterableSettingsBuilder<TTaskModel, TDependenciesModel>> configurator)
Parameters:configuratorAction<GanttColumnFilterableSettingsBuilder<TTaskModel, TDependenciesModel>>

The GanttColumnFilterableSettingsBuilder<TTaskModel, TDependenciesModel> for the filterable setting.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current instance of GanttColumnBuilder<TTaskModel, TDependenciesModel> .

If set to true and if filtering is enabled for the entire Gantt, a filter menu will be displayed for this column. If set to false, the filter menu will not be displayed. By default, a filter menu is displayed for all columns when filtering is enabled through the filterable option. Can be set to a JavaScript object which represents the filter menu configuration.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Filterable(bool enabled)
Parameters:enabledbool

Enables or disables the filterable option.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current instance of GanttColumnFilterableSettingsBuilder<TTaskModel, TDependenciesModel> .

Gets or sets the format for displaying the data.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Format(string value)
Parameters:valuestring

The value.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@( Html.Kendo().Gantt(Model)
.Name("Gantt")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderDate).Format("{0:dd/MM/yyyy}"))
)

The HTML attributes of the table header cell (<th>) that is rendered for the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderAttributes(IDictionary<string, object> value)
Parameters:valueIDictionary<string, object>

The value for HeaderAttributes

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The HTML attributes of the table header cell (<th>) that is rendered for the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderAttributes(object value)
Parameters:valueobject

The value for HeaderAttributes

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The template which renders the column header content. By default, the value of the title column option is displayed in the column header cell.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderTemplate(string value)
Parameters:valuestring

The value for HeaderTemplate

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).HeaderTemplate("Value");
})
)

The template which renders the column header content. By default, the value of the title column option is displayed in the column header cell.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderTemplate(TemplateBuilder<dynamic> template)
Parameters:templateTemplateBuilder<dynamic>

The content of the column.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title)
.HeaderTemplate(Html.Kendo().Template()
.AddHtml("&lt;div class='my-custom-cell'&gt;${data.Title}&lt;/div&gt;")
);
})
)

The template which renders the custom content of the Header.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The value that configures the template.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).HeaderTemplateHandler("templateHandler");
})
)

The template which renders the column header content. By default, the value of the title column option is displayed in the column header cell.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for HeaderTemplate

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).HeaderTemplateId("Value");
})
)

The template which renders the column header content. By default, the value of the title column option is displayed in the column header cell.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HeaderTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template element for HeaderTemplate

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).HeaderTemplateView(Html.Partial("TemplateView"))
})
)

If set to true, the Gantt will not display the column. By default, all columns are displayed.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Hidden()
Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true, the Gantt will not display the column. By default, all columns are displayed.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Hidden(bool value)
Parameters:valuebool

The value for Hidden

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The HTML attributes of the table cell (<td>) that is rendered for the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HtmlAttributes(IDictionary<string, object> value)
Parameters:valueIDictionary<string, object>

The value for HtmlAttributes

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The HTML attributes of the table cell (<td>) that is rendered for the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> HtmlAttributes(object value)
Parameters:valueobject

The value for HtmlAttributes

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true, the Gantt will display the column in the column menu. By default, the column menu includes all data-bound columns, that is, the ones with a set field option.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Menu(bool value)
Parameters:valuebool

The value for Menu

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The pixel screen width below which the column will be hidden. The setting takes precedence over the hidden setting and the two cannot not be used at the same time.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> MinScreenWidth(double value)
Parameters:valuedouble

The value for MinScreenWidth

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

If set to true the user could sort this column by clicking its header cells. By default sorting is disabled.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Sortable()
Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).Sortable();
})
)

Sortable configuration

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Sortable(Action<GanttColumnSortableSettingsBuilder> configurator)
Parameters:configuratorAction<GanttColumnSortableSettingsBuilder>

The action that configures the sortable.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).Sortable(s =&gt; s.Compare("compareHandler"));
})
)

If set to true the user could sort this column by clicking its header cells. By default sorting is disabled.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Sortable(bool value)
Parameters:valuebool

Determines whether sorting will be enabled or not.

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).Sortable(true);
})
)

The template which renders the column content. The Gantt renders table rows (<tr>) which represent the data source items. Each table row consists of table cells (<td>) which represent the GanttList columns. By default, the HTML-encoded value of the field is displayed in the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Template(string value)
Parameters:valuestring

The value for Template

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).Template("Value");
})
)

The template which renders the column content. The Gantt renders table rows (<tr>) which represent the data source items. Each table row consists of table cells (<td>) which represent the GanttList columns. By default, the HTML-encoded value of the field is displayed in the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Template(TemplateBuilder<dynamic> template)
Parameters:templateTemplateBuilder<dynamic>

The value for the Template

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title)
.Template(Html.Kendo().Template()
.AddHtml("&lt;div class='my-custom-cell'&gt;${data.Title}&lt;/div&gt;")
);
})
)

The template which renders the column content. The Gantt renders table rows (<tr>) which represent the data source items. Each table row consists of table cells (<td>) which represent the GanttList columns. By default, the HTML-encoded value of the field is displayed in the column.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Columns(columns =&gt;
{
columns.Bound(c =&gt; c.Title).TemplateId("Value");
})
)

The text that is displayed in the column header cell. If not set the field is used.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Title(string value)
Parameters:valuestring

The value for Title

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.

The width of the column. Numeric values are treated as pixels.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Width(double value)
Parameters:valuedouble

The value for Width

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

A GanttColumnBuilder<TTaskModel, TDependenciesModel> instance that can be used to configure the Gantt column.

Example:
C#
@( Html.Kendo().Gantt(Model)
.Name("Gantt")
.Columns(columns =&gt; columns.Bound(o =&gt; o.OrderID).Width(100))
)

The width of the column. Numeric values are treated as pixels.

C#
public GanttColumnBuilder<TTaskModel, TDependenciesModel> Width(string value)
Parameters:valuestring

The value for Width

Returns:

GanttColumnBuilder<TTaskModel, TDependenciesModel>

Returns the current GanttColumnBuilder<TTaskModel, TDependenciesModel> instance.