TreeListHtmlCommandCellEventArgs Class
Namespace: DevExpress.Web.ASPxTreeList
Assembly:
DevExpress.Web.ASPxTreeList.v24.2.dll
Declaration
public class TreeListHtmlCommandCellEventArgs :
EventArgs
Public Class TreeListHtmlCommandCellEventArgs
Inherits EventArgs
The following example illustrates how to hide the tree list’s parent nodes cell content.
MVC:
.HideCell {
visibility: hidden;
}
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