Ouch, I've just read the http://www.devexpress.com/Support/Center/p/B191171.aspx report and I'm really disapointed !
I trully thought that you guys have implemented check/radio states as it was already done in the old good VirtualTreeView component. But no, missing features are:
- Automatic state change propagation for mixed check button type is possible (if enabled). -> We can't disabling it with dx.
- Check events OnChecking and OnCheck events are supplied too -> No OnChecking event with dx.
I need to apply my own logic when checking a node and it seems I can't with the current implementation of TcxTreeList :
- no OnChecking event (like OnEditing for exemple, a Node parameter and a AAllow parameter).
English is not my mother tongue (so I may have misunderstood the following) but what does that sentence ("What's New in v5" topic of ExpressQuantum TreeList 5 help manual) mean :
>>[Radio and Check Groups]
>>With v5, you can specify which control type will be used to indicate the check state of a node's immediate children – check boxes or radio buttons. A parent node keeps track of child node states, and automatically updates its own check state, and vice versa. You can customize the default logic by handling a specially designed event. You can also use grayed state for parent nodes, or prohibit end-users from changing a node's state. To enable check or radio groups in the TreeList control, set its OptionsView.CheckGroups property to True.
The important part is "You can customize the default logic by handling a specially designed event." Where is that specially designed event ? I've only found the "OnNodeCheckChanged" event that only fires when a Node's checkstate has been updated (too late, no previous checkstate) and what is the "AState: TcxCheckBoxState" parameter designed for, since it's always equal to the ANode.CheckState...
Do you have any workarounds to help me to implement my own logic when checking a node ? If no, can you consider this suggestion: Add a new option to the TcxTreeList as "CheckStatePropagation: Boolean; Default True", Set to true = works like now, set to false = only the current node checkstate is updated.
Thank you for your message.
I apologize, the current TreeList version does not have such events.
Please explain what custom logic you want to achieve in greater detail, and we will try to find a solution for you. Otherwise, we will register a new suggestion for this functionality.
I need to unsynchronise node checkstate with its parent and children. Each node should have its own checkstate not depending on its parent nor its children nodes checkstate.
For exemple, you have a tree with 1 root node with an associated checkbox and 2 children with an associated checkbox. the meaning of this is :
- "root node" = default process for action.
- "child1"=special process1 for action.
- "child2"=special process2 for action.
If you check the root node only "default process for action" will be executed (no checkstate propagation for children) but if you change your mind and check the 2nd children "child2" then the root node will be unchecked and only the child2 node will be checked. I want to use my own custom logic/algorithm for checkstate mechanism.
In fact I only want a checkbox associated with a node and chaning its checkstate should not impact (under some conditions) parent's checkstate nor children's checkstate.
I also would like a new event OnNodeCheckChanging(Sender: TcxCustomTreeList; ANode: TcxTreeListNode; AAllow: Boolean) to control the node checking mechanism when the en user is checking a node. This kind of event will allow me to prohibit (or not) the check/uncheck state under certains condictions.
Thank you for the additional clarification.
I apologize, the current TreeList version does not support this behavior for check groups.
So, I have converted this report to a suggestion.
Ok then I've to use (again) my own logic with hittest on stateimage with a hidden selected column for checkstate.
If you choose to implement my suggestion, do not only focus on the title of this report, I humbly need :
1) Add a new event OnNodeCheckChanging(Sender: TcxCustomTreeList; ANode: TcxTreeListNode; AAllow: Boolean) to control the node checking mechanism when the end user is checking a node
2) Checkstate per node without propagating checkstate to ancestors nor children.