Показать сообщение отдельно
  #8  
Старый 10.01.2010, 20:48
Аватар для Страдалецъ
Страдалецъ Страдалецъ вне форума
Гуру
 
Регистрация: 09.03.2009
Адрес: На курорте, из окна вижу теплое Баренцево море. Бррр.
Сообщения: 4,721
Репутация: 52347
По умолчанию

Ну вот смотрите:
Код:
unit Unit37;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, Grids, DBGrids, DBClient;

type
  TForm37 = class(TForm)
    ClientDataSet1: TClientDataSet;
    ClientDataSet2: TClientDataSet;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    DBGrid2: TDBGrid;
    ClientDataSet1id: TAutoIncField;
    ClientDataSet1Text: TStringField;
    ClientDataSet2id: TAutoIncField;
    ClientDataSet2Text: TStringField;
    ClientDataSet2MasterID: TIntegerField;
    DataSource2: TDataSource;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form37: TForm37;

implementation

{$R *.dfm}

end.
dfm-файл
Код:
object Form37: TForm37
  Left = 0
  Top = 0
  Caption = 'Form37'
  ClientHeight = 339
  ClientWidth = 481
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object DBGrid1: TDBGrid
    Left = 8
    Top = 8
    Width = 465
    Height = 153
    DataSource = DataSource1
    TabOrder = 0
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'id'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'Text'
        Width = 354
        Visible = True
      end>
  end
  object DBGrid2: TDBGrid
    Left = 8
    Top = 167
    Width = 465
    Height = 164
    DataSource = DataSource2
    TabOrder = 1
    TitleFont.Charset = DEFAULT_CHARSET
    TitleFont.Color = clWindowText
    TitleFont.Height = -11
    TitleFont.Name = 'Tahoma'
    TitleFont.Style = []
    Columns = <
      item
        Expanded = False
        FieldName = 'id'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'Text'
        Visible = True
      end
      item
        Expanded = False
        FieldName = 'MasterID'
        Visible = True
      end>
  end
  object ClientDataSet1: TClientDataSet
    Active = True
    Aggregates = <>
    Params = <>
    Left = 120
    Top = 56
    Data = {
      690000009619E0BD010000001800000002000000000003000000690002696404
      0001000000010007535542545950450200490008004175746F696E6300045465
      7874010049000000010005574944544802000200320001000C4155544F494E43
      56414C55450400010001000000}
    object ClientDataSet1id: TAutoIncField
      DisplayWidth = 12
      FieldName = 'id'
    end
    object ClientDataSet1Text: TStringField
      DisplayWidth = 73
      FieldName = 'Text'
      Size = 50
    end
  end
  object ClientDataSet2: TClientDataSet
    Active = True
    Aggregates = <>
    IndexFieldNames = 'MasterID'
    MasterFields = 'id'
    MasterSource = DataSource1
    PacketRecords = 0
    Params = <>
    Left = 112
    Top = 208
    Data = {
      7A0000009619E0BD0100000018000000030000000000030000007A0002696404
      0001000000010007535542545950450200490008004175746F696E6300045465
      78740100490000000100055749445448020002003200084D6173746572494404
      0001000000000001000C4155544F494E4356414C55450400010001000000}
    object ClientDataSet2id: TAutoIncField
      FieldName = 'id'
    end
    object ClientDataSet2Text: TStringField
      FieldName = 'Text'
      Size = 50
    end
    object ClientDataSet2MasterID: TIntegerField
      FieldName = 'MasterID'
    end
  end
  object DataSource1: TDataSource
    DataSet = ClientDataSet1
    Left = 200
    Top = 56
  end
  object DataSource2: TDataSource
    DataSet = ClientDataSet2
    Left = 200
    Top = 208
  end
end
__________________
Жизнь такова какова она есть и больше никакова.
Помогаю за спасибо.
Ответить с цитированием