VCL Delphi

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, DBTables, StdCtrls, Grids, DBGrids;
type
TForm1 = class(TForm)
DBGrid1: TDBGrid;
Label1: TLabel;
DataSource1: TDataSource;
Table1: TTable;
procedure DBGrid1ColEnter(Sender: TObject);
procedure DataSource1DataChange(Sender: TObject; Field: TField);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
type
TFake = class(TDBGrid);
procedure TForm1.DBGrid1ColEnter(Sender: TObject);
begin
label1.Caption :=format('column: %2d; Row: %d',[TFake (DBGrid1).Col,TFake (DBGrid1).row]);
end;
procedure TForm1.DataSource1DataChange(Sender: TObject; Field: TField);
begin
DBGrid1ColEnter(sender);
end;
end.