Skip to main content

Example: OnIsGroupNode

The following sample uses the OnIsGroupNode event. The event handler checks whether the current node is a root level node and, if so, the handler makes it a group node.

Note that it is necessary to set the PaintStyle to tlpsCategorized.

procedure <Form>.<TreeList>IsGroupNode(Sender: TcxCustomTreeList;
  ANode: TcxTreeListNode; var IsGroup: Boolean);
begin
  IsGroup := ANode.Level = 0;
end;