GanttSettings.Columns Property
Provides access to the Gantt’s column collection.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
MVCxGanttColumnCollection | Specifies a collection of columns in the Gantt control. |
Remarks
The Columns property stores a collection of columns in the gantt - MVCxGanttColumn objects. This collection provides methods that allow you to add new and remove existing columns. Individual columns can be accessed using indexed notation.
@Html.DevExpress().Gantt(settings => {
settings.Name = "gantt";
settings.CallbackRouteValues = new { Controller = "Gantt", Action = "FeaturesPartial" };
settings.Width = Unit.Percentage(100);
...
settings.Columns.Add(c => {
c.FieldName = "Subject";
c.Width = 280;
});
settings.Columns.Add(c => {
c.FieldName = "StartDate";
c.Width = 100;
c.DisplayFormat = "MM/dd/yyyy";
});
settings.Columns.Add(c => {
c.FieldName = "EndDate";
c.Width = 100;
c.DisplayFormat = "MM/dd/yyyy";
});
...
}).Bind(GanttDataProvider.Tasks, GanttDataProvider.Dependencies, GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments).GetHtml()
Online Demos
See Also