Ignore:
Timestamp:
Jun 13, 2011, 2:41:33 PM (13 years ago)
Author:
george
Message:
  • Fixed: Do not show RelationMany items in Add and Edit form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UItemEdit.pas

    r15 r18  
    123123  if Report.Count = 1 then
    124124    for I := 0 to Report.Columns.Count - 1 do
    125     if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin
     125    if (TReportColumn(Report.Columns[I]).ColumnName <> 'Id') then begin
    126126
    127127      NewLabel := TLabel.Create(Panel1);
     
    132132
    133133      DataType := TReportColumn(Report.Columns[I]).CustomType;
    134       NewControl := DataType.CreateControl(Panel1);
    135       DataType.Load(TReportLine(Report[0]).Items[I]);
    136       DataType.SetupControl(NewControl);
    137       NewControl.Parent := Panel1;
    138       NewControl.Top := LastTop;
    139       NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
    140       NewControl.Width := (Width div ColumnCount) div 2 - 20;
    141       ControlList.Add(NewControl);
     134      if not (DataType is TDataTypeRelationMany) then begin
     135        NewControl := DataType.CreateControl(Panel1);
     136        DataType.Load(TReportLine(Report[0]).Items[I]);
     137        DataType.SetupControl(NewControl);
     138        NewControl.Parent := Panel1;
     139        NewControl.Top := LastTop;
     140        NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;
     141        NewControl.Width := (Width div ColumnCount) div 2 - 20;
     142        ControlList.Add(NewControl);
    142143
    143       Column := (Column + 1) mod 2;
    144       if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     144        Column := (Column + 1) mod 2;
     145        if Column = 0 then LastTop := LastTop + NewControl.Height + 4;
     146      end;
    145147   end else ControlList.Add(nil);
    146148end;
Note: See TracChangeset for help on using the changeset viewer.