Ticket Q34626
Visible to All Users

HTML in VerticalGrid Memo column

created 17 years ago

I am using D2007, latest release of DevEx VCL components and MS SQL which retrieves nText columns "Description" & “Notes” from a commercial application. It contains text similar to that below. I appears to be HTML. I would like to display this formatted in a VCL Vertical Grid “Memo” item. Is there a way to get this text translated so it will display and / or edit properly?
Thank you,
Robert Baker
<UL>
<LI>Step 6</LI>
<UL>
<LI>Once the physical bin goes back to the ship room the order is created using ACCESS</LI>
<LI>This screen is used to check if client is already in data base</LI>
<LI>Step 9 - Generate Invoice</LI>
<UL>
<LI>Include Transaction #’s</LI>
<LI>Address on Invoice</LI>
<LI>Show all phone #’s</LI>
<LI>Available to type an alternative address</LI></UL>
<LI>Photo Copy Merchandise </LI>
<LI>File in Physical Filing Cabinet</LI>
<LI>Order Complete</LI></UL>
<P> </P>
<P> </P>
<P> </P>
<P><BR>This form is to certify that the above requirements Document has been delivered in accordance with </P>
<P>Name: __________________________________<BR>Date: _______________________________</P>
<P> </P>

Show previous comments (1)

    I was able to meet my immediate need using tRichView's tDBRichViewEdit component.
    As an FYI [perhaps a feature suggestion for DevEx], tRichView has an HTML importer component [tRvHtmlImporter]
    and a couple of methods on their tDBRichViewEdit component that facilitates overrides the loading and saving of the
    HTML <--> RTF content.
    Just a thought, as I know that this is not the only application that stores HTML that needs to be edited.
    Thanks for your help. -rb-
    ----------------------------------------------------------------------------------------------------------------
    procedure TfrmMain.DBRichViewEdit2LoadCustomFormat(Sender: TCustomRichView;
      Stream: TStream; var DoDefault: Boolean);
    var s: String;
    begin
      try
        SetLength(s, Stream.Size);
        Stream.ReadBuffer(PChar(s)^, Length(s));
        RvHtmlImporter2.LoadHtml(s);
        DoDefault := False;
      except
      end;
    end;
    procedure TfrmMain.DBRichViewEdit2SaveCustomFormat(Sender: TCustomRichView;
      Stream: TStream; var DoDefault: Boolean);
    begin
      Sender.SaveHTMLToStream(Stream, ExtractFilePath(Application.ExeName),
        'title', 'img', []);
      DoDefault := False;
    end;

      See my last entry on this issue

      Serge (DevExpress Support) 17 years ago

        Hi Robert,
        Thank you very much for the input. We're happy to hear that you've found a solution, and thank you for posting your finding here. Undoubtedly, this information will be helpful to other programmers who may need this functionality.
        Thanks,
        Serge

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.