type TDBGridX = class(TDBgrid); label1.Caption:= inttostr(TDBGridX(dbGrid1).Row); label2.Caption:= inttostr(TDBGridX(dbGrid1).RowCount-1);