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
570
DetectUrls for UltraFormattedTextEditor
posted

I would like to swap out a RichTextBox in favor of the UltraFormattedTextEditor, but I am having a problem with getting links to show up.  The control will be used as a log viewer which will not be editable.  The logs which it will display will contain URLs as well as plain text.  The in box RichTextBox has the DetectUrls property which correctly auto identifies the URLs and formats them accordingly (underlined with blue forecolor).  I cannot seem to get this same functionality out of the UltraFormattedTextEditor.  I have tried working with the TreatValueAs property, but that doesn't seem to do anything.  I have tried the sample application "Ribbon With FormattedEditor".  That sample does show how to insert links into the control while in edit mode, but I have log files which need to be viewed in the control and have their URLs auto detected.  The sample's use of the TreatValueAs property also does not seem to do anything.  I am using version 2008.3 with the latest hotfix.

Any advice or help on this issue is greatly appreciated.

Thanks,

Justin

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Justin,

    The UltraFormattedTextEditor doesn't have any auto-detection of URLs. The URLs have to be specifically encoded into the XML.

    You could code this to detect the URLs yourself, of course. If you want to do this without changing the actual data, then what I would do is hide the real bound column in your grid, then add an unbound column to display the data you want. Then you can use the grid's InitializeRow event to take the value fom the bound column and modify the text for display.

Children