#1 mORMot 1 » TSQLTableToGrid » 2011-09-19 14:30:10

magik
Replies: 1

I have a question about TableToGrid. I have two tables:

TSQLKeys = class(TSQLRecord)                                                                                                                                                                                                   
  private                                                                                                                                                                                                                         
    fName: RawUTF8;                                                                                                                                                                                                 
  published                                                                                                                                                                                                                       
    property Name: RawUTF8 read fName write fName;                                                                                                                                                                 
  end;                   

TSQLValues = class(TSQLRecord)                                                                                                                                                                                                   
  private                                                           
    fKey_id :  TSQLKeys;                                                                                                                                                             
    fValue: RawUTF8;                                                                                                                                                                                                 
  published   
    property Key_id: TSQLKeys read fKey_id;                                                                                                                                                                                                                   
    property Value: RawUTF8 read fValue write fValue;                                                                                                                                                                 
  end;                 

I would like to display a grid of Valuses with two collumns: Keys and Values, where each Key is a Name from Keys selected by value Key_id stored in Valuses table.
How to do it? Can I use TSQLTableToGrid for it?

Board footer

Powered by FluxBB