TTMSFNCDataGrid from TTMSFNCDataGridRenderer

Hello,

How can I find the TTMSFNCDataGrid that is linked to the TTMSFNCDataGridRenderer.

Thanks,

Kind regards,
Erik

the TTMSFNCDataGridRenderer has a Host property, which can be used to find out which component is using the renderer. You can then write the following code:

var
  r: TTMSFNCDataGridRenderer;
  g: TTMSFNCCustomDataGrid;
begin
  r := MyRenderer;
  if Assigned(r.Host) and (r.Host is TTMSFNCCustomDataGrid) then
    g := r.Host as TTMSFNCCustomDataGrid;
end;