Hi guys,
I have hooked Insert and Delete keydown on a treenode to Add sub-node on this node and delete the node itself. I can cancel the operation for certain nodes (in effect disable insert and delete for those nodes) in the keydown event.
On the other hand, for editing the node label, there is already built in the functionality to start editing with a. either F2 or b. two clicks with a short delay between them. And there is the problem. How can I cancel (disable) editing for certain nodes? As soon as they receive F2 or the two delayed clicks they go into editing mode.
Best,
Alex
Thanks, Luca, that did the trick! I was using BeforeLabelEdit and I was returning if I was on the node I want to cancel edit for, had not seen the e.CancelEdit.
Best,
Alex
PS. Have u checked your spam folder lately? 🙂
Hi Alex,
Did you try TreeView.OnBeforeLabelEdit? You can set CancelEdit = true to prevent edit mode.
Best,
Luca