The following sample uses the OnGetDisplayText event. The event handler changes the category value of group nodes.
procedure <Form>.<Column>GetDisplayText(Sender: TcxTreeListColumn;
ANode: TcxTreeListNode; var Value: String);
begin
if ANode.IsGroupNode then
// adding the number of the first level child nodes
Value := Value + ' (' + IntToStr(ANode.Count) + ')';
end;
void __fastcall <Form>::<Column>GetDisplayText(TcxTreeListColumn *Sender, TcxTreeListNode *ANode, AnsiString &Value) {
if (ANode->IsGroupNode) {
// adding the number of the first level child nodes
Value = Value + " (" + IntToStr(ANode->Count) + ")";
}
}