TreeListSettings.CustomColumnDisplayText Property

Enables custom display text to be provided for any cell.

Namespace: DevExpress.Web.Mvc

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


public TreeListCustomColumnDisplayTextEventHandler CustomColumnDisplayText { get; set; }

Property Value

Type Description

A delegate method that allows you to provide custom display text for any cell.


The CustomColumnDisplayText event can be used to provide custom display text for any cell. This event is fired for both 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).


The CustomColumnDisplayText event should not be handled for template columns.

@Html.DevExpress().TreeList(settings => {
    settings.Name = "treeList";
    settings.CustomColumnDisplayText = (s, e) =>
        if (e.Column.FieldName != "Budget") return;
        if (Convert.ToInt32(e.Value) > 0)
            e.DisplayText = "sample text";

See Also