Hello,
out of a greater issue I tried to recreate my problem in a small example.
But by even by trying to create the example I encountered this behavior which I can not understand.
Please have a quick look at my very small example and tell me why the datasource is not being updated after adding a new object and editing it's text.
Blue
Hello Blue,
I took a look at your sample, added a new 'UltraButton' control and in its click event I am now checking the 'elements.Count' property. It seems to me that after adding a new element from your button and code and then check the count from my button everything looks fine - the new object is showing in the tree and in the elements datasource. Please take a look, I will be waiting for your feedback.
Hello Boris,
the problem lies not in adding the element, it is updating the new element.
Try it out, update is not invoked after editing the cell text and pressing enter or activating a different node.
as far as I know this should happen automatically since the UpdateMode of the tree says so.
I now react to key input like "Enter" or "Return" to update the node's cell manually, I dislike this.
anyway, thanks for your help.
You could use the 'EndCellEdit()' method of the node object:
ultraTree1.ActiveNode.EndCellEdit(false);
Please do not hesitate to contact me if you need any additional assistance.