//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "StringGridRows.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: StringGridRows
// Property: Grids.TCustomGrid.Row
// Property: Grids.TStringGrid.Rows

// BeginCode
/*
This example displays a string grid, a list box, and a
button on a form. When the application runs, strings are put
in the cells of row 1 of the string grid. When the user
clicks the button, The strings in the current row of the
grid are displayed in the list box.
Note that when the grid contains an empty cell, the list box
has a corresponding empty string.
*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  ListBox1->Items = StringGrid1->Rows[StringGrid1->Row];
}

void __fastcall TForm1::FormCreate(TObject *Sender)
{

  StringGrid1->Cells[1][0] = "Column 1";
  StringGrid1->Cells[2][0] = "Column 2";
  StringGrid1->Cells[3][0] = "Column 3";
  StringGrid1->Cells[4][0] = "Column 4";
  StringGrid1->Cells[0][1] = "Row 1";
  StringGrid1->Cells[1][1] = "Object";
  StringGrid1->Cells[2][1] = "Pascal";
  StringGrid1->Cells[3][1] = "is";
  StringGrid1->Cells[4][1] = "excellent";
  StringGrid1->Cells[0][2] = "Row 2";
  StringGrid1->Cells[1][2] = "Delphi";
  StringGrid1->Cells[2][2] = "is";
  StringGrid1->Cells[4][2] = "RAD";

}
// EndCode
// EndExample: StringGridRows
//---------------------------------------------------------------------------

