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

GanttGroupColumnBuilder

Properties

Column - IGanttColumn

Sortable settings configuration.

Methods

Title(System.String)

Sets the title displayed in the header of the column.

Parameters

text - System.String

The text.

Example


             @( Html.Kendo().Gantt(Model)
                        .Name("Gantt")
                        .Columns(columns => columns.Bound(o => o.OrderID).Title("ID"))
            )

Editable(System.Boolean)

Makes the column editable or not.By default a column is not editable.

Parameters

value - System.Boolean

Example


             @( Html.Kendo().Gantt(Model)
                        .Name("Gantt")
                        .Columns(columns => columns.Bound(o => o.OrderID).Editable(true))
            )

Width(System.Int32)

Sets the width of the column in pixels.

Parameters

pixelWidth - System.Int32

The width in pixels.

Example


             @( Html.Kendo().Gantt(Model)
                        .Name("Gantt")
                        .Columns(columns => columns.Bound(o => o.OrderID).Width(100))
            )

Format(System.String)

Gets or sets the format for displaying the data.

Parameters

value - System.String

The value.

Example


             @( Html.Kendo().Gantt(Model)
                        .Name("Gantt")
                        .Columns(columns => columns.Bound(o => o.OrderDate).Format("{0:dd/MM/yyyy}"))
            )

HtmlAttributes(System.Object)

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

Parameters

value - System.Object

The value that configures the htmlattributes.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HtmlAttributes(new { data-custom = "Value" });
                })
            )

HtmlAttributes(System.Collections.Generic.IDictionary)

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

Parameters

value - System.Collections.Generic.IDictionary<String,Object>

The value that configures the htmlattributes.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HtmlAttributes(attr);
                })
            )

Expandable(System.Boolean)

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.

Parameters

value - System.Boolean

The value that configures the expandable.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).Expandable(true);
                })
            )

Filterable(System.Boolean)

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.

Parameters

enabled - System.Boolean

Enables or disables the filterable option.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                       columns.Bound(c => c.Title).Filterable(true);
                })
            )

Filterable(System.Action)

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.

Parameters

configurator - System.Action<GanttColumnFilterableSettingsBuilder>

The action that configures the filterable.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                      columns.Bound(c => c.Title).Filterable(f => f.Ui("compareHandler"));
                })
            )

HeaderAttributes(System.Object)

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

Parameters

value - System.Object

The value that configures the headerattributes.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HeaderAttributes(new { data-custom = "Value" });
                })
            )

HeaderAttributes(System.Collections.Generic.IDictionary)

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

Parameters

value - System.Collections.Generic.IDictionary<String,Object>

The value that configures the headerattributes.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HeaderAttributes(attr);
                })
            )

HeaderTemplate(System.String)

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

Parameters

value - System.String

The value that configures the headertemplate.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HeaderTemplate("Value");
                })
            )

HeaderTemplateId(System.String)

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

Parameters

value - System.String

The value that configures the headertemplate.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HeaderTemplateId("Value");
                })
            )

HeaderTemplateView(System.Web.Mvc.MvcHtmlString)

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

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the headertemplate.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).HeaderTemplateView(Html.Partial("TemplateView"))
                })
            )

HeaderTemplateHandler(System.String)

The template which renders the custom content of the Header.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                   columns.Bound(c => c.Title).HeaderTemplateHandler("templateHandler");
                })
            )

Hidden(System.Boolean)

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

Parameters

value - System.Boolean

The value that configures the hidden.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).Hidden(true);
                })
            )

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.

Parameters

value - System.Boolean

The value that configures the menu.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).Menu(true);
                })
            )

MinScreenWidth(System.Double)

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.

Parameters

value - System.Double

The value that configures the minscreenwidth.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).MinScreenWidth(1600);
                })
            )

Template(System.String)

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.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).Template("Value");
                })
            )

TemplateId(System.String)

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.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).TemplateId("Value");
                })
            )

TemplateView(System.Web.Mvc.MvcHtmlString)

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.

Parameters

value - System.Web.Mvc.MvcHtmlString

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                    columns.Bound(c => c.Title).TemplateView(Html.Partial("TemplateView"));
                })
            )

TemplateHandler(System.String)

The template which renders the custom content.

Parameters

value - System.String

The value that configures the template.

Example


            @(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
                .Name("gantt")
                .Columns(columns =>
                {
                   columns.Bound(c => c.Title).TemplateHandler("templateHandler");
                })
            )

In this article
Not finding the help you need?