Skip to main content
All docs
V19.1

GanttSettings.CustomColumnDisplayText Property

Enables custom display text to be provided for any cell.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.1.dll

Declaration

public TreeListCustomColumnDisplayTextEventHandler CustomColumnDisplayText { get; set; }

Property Value

Type Description
TreeListCustomColumnDisplayTextEventHandler

A delegate method allowing you to implement custom processing.

Remarks

Use the CustomColumnDisplayText property to provide custom display text for any cell (for bound and unbound columns).

Initially, the DisplayText parameter returns null. To provide custom display text, assign the required string to this parameter. To get the current cell value, use the Value parameter.

The CustomColumnDisplayText event fires in two cases.

  • When the control hierarchy is being built.
  • When a grid is sorted by display text (the SortMode property is set to DisplayText).
@Html.DevExpress().Gantt(settings => {
    ...
    settings.ClientLayout += (s, e) => {
        if (e.Column.FieldName != "Subject") return;
        if (Convert.ToString(e.Value) == "test_1")
          e.DisplayText = "test";
    };
    ...
}).Bind(GanttDataProvider.Tasks, GanttDataProvider.Dependencies, GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments).GetHtml()
See Also