Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

XTree with TElTreeInplaceDateTimePicker: Updating tree cell after a change

I have 2 forms with different uses of the XTree, and both have a TElTreeInplaceDateTimePicker in use.

On the first, after making an inplace change to the datetime the cell value is updated correctly if the user clicks on a difference cell of the XTree.

On the second, clicking on a different cell of the XTree cancels the edit and the original value remains.

I can't see any difference and I have removed all of the code in the OnAfter, OnBefore and OnValidate events.

In the 2nd, the OnAfter event receives Accepted := False, whereas in the first event Accepted := True.

What could be causing this inconsistency?

I want the second form to process the exit of the cell as acceptance (if valid), not a cancel.
How can I make this happen?

Also, on the 2nd form OnValidate starts to execute, but the ShowMessage() in it is not displayed, but instead, OnAfter is executed and the ShowMessage() in there is displayed first followed afterwards by the OnValidate's ShowMessage().

On the first form, the OnValidate fires first and displays its message, then OnAfter fires, and then OnValidate fires again.

What can I do with this to make it all work correctly?

Thanks.
Raymond.

Comments

  • 2 Comments sorted by Votes Date Added
  • Posts: 0 Accepted Answer Vote Up0Vote Down
    Hi Raymond,

    Looks like in the second case the ElXTree's ExplorerEditMode property is set to false.
    Set it to true to autoaccept edited values when editor looses focus.

    Best regards,
    Victor
Sign In or Register to comment.