Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
How to change editor text value before edit mode?
posted

I am using a derived UltraTextEditor to allow users to edit numbers in various free form formats. When rendering the value, the decimal places are truncated. When editing, all decimal places need to be shown. Then when user edits and leaves Edit mode, the string is converted back to a value.

For example, value = 1.2345678 shows as 1.23. When the user starts to edit, the value needs to be shown as 1.2345678 such that the user edits the actual value. Else with no edits, there is a round trip error when the string converts to the value as 1.23.

How do I refresh the editor's text when entering edit mode. I have overridden the OnBeforeEnterEdit event and have tried changing the UltraTextEditor.Text, the Editor.Text and Editor.Textbox.Text. None seem to trigger the editor to redisplay. I am using a DataFilter to format the text in the Editor -> Display conversion. The DataFilter is not called to do the any conversion when EnterEditMode.

Any suggestions? Thanks,

Wendy