TreeListColumnDisplayTextEventArgs.DisplayText Property

Enables you to set a custom text for the cell currently being processed.

Namespace: DevExpress.Web.ASPxTreeList

Assembly: DevExpress.Web.ASPxTreeList.v19.2.dll

Declaration

public string DisplayText { get; set; }
Public Property DisplayText As String

Property Value

Type Description
String

A String value that specifies the custom cell's display text. The default value is null.

Remarks

Initially, the DisplayText property returns null. Assign custom text to the DisplayText property to display it in the processed cell.

To get the cell's edit value, use the TreeListColumnDisplayTextEventArgs.Value property.

Examples

This example demonstrates how to display the "empty" string within the Units On Order column's data cells if they contain zero values.

The image below shows the result:

ASPxTreeList-CustomColumnDisplayText

protected void ASPxTreeList1_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxTreeList.TreeListColumnDisplayTextEventArgs e)
{
    if (e.Column.FieldName != "UnitsOnOrder") return;
    if (Convert.ToInt32(e.Value) == 0)
        e.DisplayText = "empty";
}
See Also