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
410
optionset displaytext embedded HTML
posted

Is there a way to set the displaytext to formatted text?

IE.  UltraOptionSet1.Items(0).DisplayText = "Current Visit "   &  " <span style=""color:Blue;"">(" & count & ")</span>"

Does not seem to work... 

Parents
No Data
Reply
  • 4625
    Suggested Answer
    Offline posted

    Hi Roger,

    Thank you for posting in our forums!

    Even that is possible to assign formatted raw string to UltraOptionSet’s item display text, it will never be formatted and rendered as per your expectations, because it doesn’t know how to convert HTML tags and apply formatting. It simply renders plain text, nothing more nothing less.

    Based on your HTML, I understand that you want to change the color of inner word inside particular string. This could be achieved using a draw filter. For more information about using this interface, please see the following documentation page: http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Win_Draw_Filter.html

    However, I created a sample project for you, where you can find implementation of your requirement - formatted UltraOptionSet’s item display text.

    Please let me know if you have any additional questions.

    UltraOptionSetEmbeddedHTML.zip
Children