Пишет Unit1.pas(39) : RowCount не объявлен в типе System.Windows.Forms.Button что не так?

Unit Unit1;

interface

uses System, System.Drawing, System.Windows.Forms;

type
Form1 = class(Form)
procedure createDataBtn_Click(sender: Object; e: EventArgs);
{$region FormDesigner}
private
{$resource Unit1.Form1.resources}
FIO: DataGridViewTextBoxColumn;
PHONE: DataGridViewTextBoxColumn;
telephoneDyrectoryTable: Button;
dataGridView1: DataGridView;
{$include Unit1.Form1.inc}
{$endregion FormDesigner}
public
constructor;
begin
InitializeComponent;
end;
end;

implementation
type user=record
fio: string;
phone: string;
end;
procedure Form1.createDataBtn_Click(sender: Object; e: EventArgs);
var
users: array[0.1] of user;
begin
users[0].fio:='петров';
users[0].phone:='89823567782';
users[0].fio:='Иванов';
users[0].phone:='98123789034';
telephoneDyrectoryTable.RowCount:=2;
for i:= 0 to 1 do begin
telephoneDirectoryTable.Rows[1].Cells[0].value:= users[i].fio;
telephoneDirectoryTable.Rows[1].Cells[1].value:= users[i].phone;
end;
end;

А как у кнопки Button могут быть строки?

Добавить комментарий