Tips and Frequently Asked Questions

 TTMSFNCGrid: Using a TTMSFNCRichEditor as inplace editor for the TTMSFNCGrid


It’s quite straightforward to use the TTMSFNCRichEditor as inplace editor for the grid. In the grid cell, you can display HTML formatted text and this can then be wysiwyg edited with TTMSFNCRichEditor.

All that is needed is to implement a few event handlers. Via OnGetCellEditorType, it is defined that a custom inplace editor should be used:

procedure TForm5.TMSFNCGrid1GetCellEditorType(Sender: TObject; ACol,
  ARow: Integer; var CellEditorType: TTMSFNCGridEditorType);
begin
  CellEditorType:= etCustom;
end;
Next, via the OnGetCellEditorCustomClassType, it is specified that the class to use for the custom editor is TTMSFNCRichEditor:

procedure TForm5.TMSFNCGrid1GetCellEditorCustomClassType(Sender: TObject; ACol,
  ARow: Integer; var CellEditorCustomClassType: TTMSFNCGridEditorClass);
begin
  CellEditorCustomClassType := TTMSFNCRichEditor;
end;
As an extra, a TMSFNCRichEditorFormatToolBar is associated with the TTMSFNCRichEditor when it is active for editing a cell and this is done from the OnGetCellEditorProperties:

procedure TForm5.TMSFNCGrid1GetCellEditorProperties(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl);
begin
  TMSFNCRichEditorFormatToolBar1.RichEditor := (CellEditor as TTMSFNCRichEditor);
end;
Finally, we must provide the event handlers for OnCellEditGetData and OnCellEditSetData where the cell text is loaded as HTML in the TTMSFNCRichEditor and vice versa. A non-visual TMSFNCRichEditorHTMLIO component is used for this conversion.

procedure TForm5.TMSFNCGrid1CellEditGetData(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl; var CellString: string);
begin
  TMSFNCRichEditorHTMLIO1.RichEditor := (CellEditor as TTMSFNCRichEditor);
  TMSFNCRichEditorHTMLIO1.LoadHTML(CellString);
end;

procedure TForm5.TMSFNCGrid1CellEditSetData(Sender: TObject; ACol,
  ARow: Integer; CellEditor: TWinControl; var CellString: string);
begin
  CellString := (CellEditor as TTMSFNCRichEditor).ContentAsHTML('''');
end;
The full sample can be downloaded from: https://download.tmssoftware.com/download/GridRichEditorEditor.zip




Pricing

Single Developer License Small Team License Site License
 

TMS FNC UI Pack


€ 375

175 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
MOST POPULAR

TMS FNC Component Studio


€ 895

375 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS FNC UI Pack
check  All TMS FNC products
more_horiz  Discover more
BEST VALUE

TMS ALL-ACCESS


€ 1,795

575 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS FNC UI Pack
check  All TMS FNC products
check  All TMS products
more_horiz  Discover more
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.

TMS ALL-ACCESS

key
Your unlimited access to all TMS products
local_offer
One money and time saving bundle

Free Trial

Start a free TMS FNC UI Pack evaluation today!

By entering your email address you agree to receive email messages from TMS Software.
RAD Studio

Visual Studio Code


What our customers say

Regarding TMSFNCRibbon: It's a great component and I appreciate especially its HighDPI awareness and option for using SVG images - it's a huge saving on my time, thanks for a great job.

- Karel Janecek

As a developer for 30+ years, and a Delphi developer since 1996, I've a solid foundation on desktop development. But I was skeptical of indulging in web development. Though the market was demanding a switch, it seemed too difficult to make the transition. TMS Software was my "magic bullet" to get me started with zero intimidation. Love their Web Core and XData products. Now I can develop powerful web applications using Delphi. TMS Software has renewed my love for Delphi and won my heart for their innovators. Thanks to the team for great products and a large volume of demos and manuals. You ROCK!

- Larry

In the past I have purchased other components from other parties. I will say proudly that TMS is the best in support, price and style. Whenever I need a help your team is always there to help me. Keep up the good work

- Mohamed Thooloon

Hi Bruno Just want to drop you a line about how great your presentation was today. We often fail to point out to someone when they do a great job! You did a great job, you gave me a lot of ideas, and you answered my question very well. THANK you for your great products & super support.

- Lawrence Green

Thank you for developing components where I can best describe it like this: TMS components is a case where "The wheels fit the car, and NOT the car fit the wheels". Well done.

- Sathiparsad

TMS WEB Core

language
Create modern web apps in Delphi & VSC
build_circle
Use Object Pascal code to build JavaScript apps