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
200
Showing Formatted Value in a grid cell and allowing partially selecting text
posted

I am using UltraWinGrid which is bind to datatable.

The datatable is having a String type column Say “Phrase”.

Apart from this, I have one unbound columns say “displayPhrase” of String type. The “Phrase” column is hidden in the grid and only above said unbound columns is displayed.

“displayPhrase” column is set to values on “InitializeRow” event of the grid.

Now I want to make the, “displayPhrase” unbound column editable to select partial text from cell’s value but data should not be editable.

To achieve that I am setting the below property for the “displayPhrase” column and grid:

displayPhraseColumn.CellActivation = Activation.ActivateOnly;

_clinicalLibraryGrid.DisplayLayout.Override.CellClickAction = CellClickAction.Edit;

As I have to show formatted data in “displayPhrase” column, I am also setting the following property on this column:

displayPhraseColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.FormattedText;

But the problem is that Style property set to “FormattedText” doesn’t work with CellClickAction set to “CellClickAction.Edit”.

If I keep the FormattedText style on column, then my data is formatted properly but the cell is not editable to partially select cell’s text. Or if I remove the FormattedText style, then data is not formatted properly instead formatting tags (<u><i></u></i>) are displayed in the cell but cell is editable to allow partially select cell’s text.

Is there any way to achieve the both i.e. having the column data formatted and also allowing selecting partial text for copy/paste?

Also please let me know how which tags I can use to highlight part of the cell value.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    Use a Style of FormattedTextEditor instead of FormattedText.

    balrajj said:
    Also please let me know how which tags I can use to highlight part of the cell value.

    There are any number of ways you could highlight text. I recommend that you try putting an UltraFormattedTextEditor control on the form and then go to the Value property. There's an editor which will allow you to edit formatted text and apply formatted and then see the tags that were generated to create that text. That's the best way to get familiar with the tags, in my opinion.

Children
No Data