Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Adding Rows to a TGrid.
Thu, Apr 16 2015 12:35 AMPermanent Link

Steve Gill

Avatar

Anyone know how to add rows to a TGrid?  In EWB1 I did this:

  grdInfo.AppendRow;
  grdInfo.Cells[0, 0] := 'Hello';

It doesn't work in EWB2 because there doesn't appear to be a Cells property.

= Steve
Thu, Apr 16 2015 6:43 AMPermanent Link

Walter Matte

Tactical Business Corporation

Steve:

Digging into source ... webgrids ...

Here it is:

procedure TForm1.Button3Click(Sender: TObject);
var
 s : string;
begin
 Grid1.AppendRow;
 Grid1.Rows.Row[0].Value[0] := 'x';
 s := Grid1.Rows.Row[0].Value[0];
end;


Walter
Thu, Apr 16 2015 7:21 AMPermanent Link

Steve Gill

Avatar

Hi Walter,

<< Digging into source ... webgrids ...

Here it is:

procedure TForm1.Button3Click(Sender: TObject);
var
 s : string;
begin
 Grid1.AppendRow;
 Grid1.Rows.Row[0].Value[0] := 'x';
 s := Grid1.Rows.Row[0].Value[0];
end;  >>

Well that's different!?!

Thanks.

= Steve



Walter
Thu, Apr 16 2015 2:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter,

Just a quick note - both of these properties (Row and Value) are marked as
default properties, so you can just use:

Grid1.Rows[0][0]

Tim Young
Elevate Software
www.elevatesoft.com
Image