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
314
Object entities among text in editor
posted

Although my question is regarding functionality in a grid I believe the answer relates more to editors why this post is here instead of in the grid category.

I'm creating an UltraGrid with a column that should have a text editing behavior similar to the style of the To, Cc and Bcc fields of a new Outlook message. See picture.

The behavior should be such as the following:

A cell should be able to hold a mix of
* "objects" of marked text – such as underlined addressees in Outlook
* characters – any regular character

If you click on an "object" the whole object should be marked – it should graphically (and logically) work as an entity – while clicking among characters should behave as any standard text editor in terms of marking and editing.
If you right-click an "object" there should be a context menu applicable to the "object".
You should be able to drag-and-drop an "object" among the characters and "objects" within the cell or to another cell in the column. Also you should be able to drag-and-drop any selection (including any combination of "objects" and characters).
There should be a relevant mechanisms for handling of the data in the cells – characters and “objects” and their ordering – where the "objects" should be linked/references to items of a datatable or similar.

(The idea is to use this feature to define display layouts. The objects are placeholders of data – such as a figure with a unit.)

I've searched through the Infragistics components the best I could and haven't found any leads among them regarding the support of such functionality, why I have the following questions:

1. Is the described functionality or something similar readily available with the Infragistics components?

2. Or will I have to implement all of this myself?

3. If so, what is a suggested best approach to implement such functionality in the UltraGrid?

4. (Or is there perhaps another standard data display layout defining approach that our designers haven’t thought about?...)

 

I'm guessing I will have to implement it all myself, and I figure I'll need to use an embeddable editor for the grid column. Which? Plain UltraTextEditor?

Then, is there some Infragistics (or other for that matter) editor text parsing mechanism that I should use? (Using regular expressions perhaps?)

Is there implementation code of standard drag-and-drop and text editing behavior available somewhere? (Trying to cut some corners...)

Are there Infragistics component mechanisms that I should utilize? EditorDataFilter? How?

Thanks in advance for any advice!

 -Ulf

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    There's no built-in functionality like this in NetAdvantage right now. But this would be a great suggestion for a feature in a future release of NetAdvantage.

    Submit a feature request to Infragistics

    This looks like a pretty complicated thing to implement yourself and without actually doing it, I couldn't say for sure that it's even possible. There are probably some pitfalls here regarding text selection that you might not be able to account for.

    If I were going to code this, I'd probably begin by using Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor, which is the editor that the UltraFormattedTextEditor uses. The underlined entities here could be thought of as hyperlinks. And then you would have to deal with keyboard behavior, either by deriving from the editor and handling it's OnKeyXXX methods or handling these on the grid using the key events.

Children