Hi
Please find below the code which i am using to highlight the part of the text in the UltraGridCell at runtime based on the text entered in the TextEditor, below code works fine for strings, but when i type in integer 1 in the texteditor i am getting an error "Cannot convert string to Integer"
As far as my knowledge goes in the below code since i am using Replace() with the html code in it, i assume this is not able to convert to integer which is why i get the error..
public bool DrawElement(DrawPhase drawPhase, ref UIElementDrawParams drawParams){ UltraGridCell aCell; Font font = this.ultraGrid1.Font; switch (drawPhase) { case DrawPhase.AfterDrawForeground:
Please help me to overcome this problem..
Thanks
Manoj
Hi,
As far as I know, there's no superscript or subscript functionality in the FormattedText support. I assume <sup> is an html tag? We don't actually use html, although our custom format is similar. So that tag probably isn't supported if it's not working.
Hi,Is there any way to add a superscript in Ultragrid cell. My need is to add a alphabet superscript in ultragrid cell. I have tried the <sup>text</sup> tag as we have used <b>text</b> tag in above example.
<b></b> tag is working fine. But <sup></sup> tag is not working. Is there any other tags present to achieve this. Please help.
eg. Sample TextM
Thanks in advance.
Hi Manoj,
I don't see any easy way to handle so complex a case. You probably have to string out the escape codes first, then applying your formatting, and then put them back in. Or write your own Replace method that skips over the appropriate codes.
Here's a list of codes that are escaped by the EscapeXML method.
& = &
< = <
> = >
" = "
Hi Mike,
The above code seems like not working..Please find the example below & the snapshot for your reference.
1. The original Text before highlighting the character 'P' in the text
Original Text : SYBIL H. POLLET & MICHAEL N. POLLET, TIC
2. After escaping the Original Text using below code, the & is replaced with &as shown below
Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue.EscapeXML(OriginalText)
Escaped XML: SYBIL H. POLLET & MICHAEL N. POLLET, TIC
3. At the time of formatting the escaped text, the formatting is also applied for the character 'P' in & as shown below, which supposed to be incorrect
Formatted Text: SYBIL H. <b>P</b>OLLET &am<b>P</b>; MICHAEL N. <b>P</b>OLLET, TIC
4. Please find the result that is shown in the grid after formatting the cell text.
Please help me with this..
Tried with the above code..It works fine... :)
Thanks a ton.... :)