Skip to main content

TreeListHtmlDataCellEventArgs.Cell Property

Gets the processed data cell.

Namespace: DevExpress.Web.ASPxTreeList

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

NuGet Package: DevExpress.Web

#Declaration

public TableCell Cell { get; }

#Property Value

Type Description
TableCell

A TableCell object that represents the processed data cell.

#Remarks

The following example illustrates how to hide the tree list’s parent nodes cell content.

MVC:

settings.HtmlCommandCellPrepared = (sender, e) =>
{
    var tl = (MVCxTreeList)sender;
    if (tl.FindNodeByKeyValue(e.NodeKey).ChildNodes.Count > 0)
        e.Cell.CssClass = "HideCell";
    };
settings.HtmlDataCellPrepared = (sender, e) =>
{
    var tl = (MVCxTreeList)sender;
    if (e.Column.FieldName != "From") {
        if (tl.FindNodeByKeyValue(e.NodeKey).ChildNodes.Count > 0)
            e.Cell.CssClass = "HideCell";
    }
};
...
See Also