Skip to main content

ASPxTreeListExportRenderBrickEventArgs.Column Property

Gets a data column that corresponds to the processed tree list element.

Namespace: DevExpress.Web.ASPxTreeList

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

NuGet Package: DevExpress.Web

Declaration

public TreeListDataColumn Column { get; }

Property Value

Type Description
TreeListDataColumn

A TreeListDataColumn object that represents the data column. null (Nothing in Visual Basic) if the processed element doesn’t belong to a column (e.g. preview, footer).

Example

This example shows how to draw department names in an exported document, based on their budget. Department names are painted in Orange if their budget is less than $100,000.

The image below shows the result:

CustomExport

using DevExpress.Web.ASPxTreeList;

protected void ASPxTreeListExporter1_RenderBrick(object sender,
DevExpress.Web.ASPxTreeList.Export.ASPxTreeListExportRenderBrickEventArgs e) {
    if (e.RowKind == TreeListRowKind.Data && e.Column != null &
        e.Column.FieldName == "Department") {
        if (Convert.ToInt32(ASPxTreeList1.FindNodeByKeyValue(e.NodeKey)["Budget"]) < 100000)
            e.BrickStyle.BackColor = System.Drawing.Color.Orange;
    }
}
See Also