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
445
UltraFormattedTextEditor URL
posted

Hi

I've been struggling with using an UltraFormattedTextEditor as a standalone control (i.e. not in a grid) on a form in a C# WinForms app to display a web hyperlink. 'TreatValueAs' is set to URL.

I want the user to be able to change the link and decided that the best approach was to make use of the EditInfo.ShowLinkDialog method to display a pop-up where they can enter a URL, Display Text and Tooltip text. This works really well. When the dialog is closed the FormattedTextEditor fully reflects what was entered in the dialog (text, URL and tooltip).

My problem is I can't figure what I need to save, say to a database, so that the FormattedTextEditor can be populated when the form is next displayed.

As an example, in the EditInfo dialog I enter: URL = 'www.google.com', Display Text = 'Google' and Tooltip Text = 'Click for Google' .

When the dialog has closed the ForrmattedTextEditor.Value property = '<a title="Click for Google" href="www.google.com">Google</a>' and I save this to a database.

When the form is next displayed I set the ForrmattedTextEditor.Value property to what was saved but then I just see the full xml string with tags exactly as it was saved. So my question is what do I need to do to achieve the same as what the EditInfo.ShowDialog is doing by setting the Display Text, URL and Tooltip text?

Hope what I have asked makes sense.

Regards

Adrian

Parents Reply Children
No Data