Hi~
help me, please!
I need to show some subscript or superscript character in ultragridcell. So I'm using richtextbox in winform control.
richtextbox is fine when it belongs winform, but is not in ultragridcell. What's wrong with me?
I'll attach some sample project and screenshot.
thank you for your help!
The RichTextBox control is a wrapper for the Windows RichTextBox class. It doesn't support the control.Draw method, so it will not work in a ControlContainerEditor.
There's a sample included with the Infragistics controls that demonstrates how to embed a RichTextBox in a cell. Assuming you chose to install the samples, it will be located under your Infragistics directory:
...\2014.1\Samples\Grid\CS\RichTextEditor
Thank you, Mike!
But, RichTextEditor class in ...\2014.1\Samples\Grid\CS\RichTextEditor does not have "SelectionFont" property, or "SelectionCharOffset" property.
I need to use these properties to show subscript or superscript.
Is there any other solution?
Hi,
I'm not sure I understand what you mean. The RichTextEditor sample uses a RichTextBox control. The same control you were presumably using in your project before.
The editor is going to get the rich text from the value of the grid cell. The editor services the entire column, so accessing methods on the RichTextBox control itself won't really do you any good, anyway. If you need to generate the RichText for a cell, I'd probably just create a RichTextBox, use the methods you need to generate the text, and then assign the Rtf property of the control to the value of the cell.