Skip to main content

TreeListHtmlCommandCellEventArgs Class

Provides data for the ASPxTreeList.HtmlCommandCellPrepared event.

Namespace: DevExpress.Web.ASPxTreeList

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

NuGet Package: DevExpress.Web

#Declaration

public class TreeListHtmlCommandCellEventArgs :
    EventArgs

#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";
    }
};
...

#Inheritance

Object
EventArgs
TreeListHtmlCommandCellEventArgs
See Also