Hello,
I have a StringGrid and two Button on my form. The StringGrid has one fixed row, ButtonAdd adds rows and ButtonRemove removes rows. I want it so that if the StringGrid has no rows (except for the fixed row), then the ButtonRemove is disabled. The following code isn't working as I intend it to:
procedure TForm.ButtonRemove(Sender: TObject);
begin
DeleteCurrentRow(StringGrid);
if StringGrid.RowCount = 1 then;
begin
ButtonRemove.Enabled := False;
end;
end;
If anybody could tell me why this is not working, it would be much appreciated.