Hello
Demo project is attached.
And here is the main part of the code.
When user moves a mouse over the grid, it writes text of a cell under the mouse poiter to a TLabel: Label1.
Code:
// Not all required methods are public
// So use trick to get to protected methods
type
TDBGridEhCrack = class (TDBGridEh);
procedure TForm1.DBGridEh1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
Cell: TGridCoord;
Column: TColumnEh;
begin
Cell := DBGridEh1.MouseCoord(X, Y);
if (Cell.X >= 0) and (Cell.Y >= 0) then
begin
if Cell.X < DBGridEh1.IndicatorOffset then
Label1.Caption := 'Indicator'
else if Cell.Y < DBGridEh1.TopDataOffset then
Label1.Caption := 'Title'
else begin
TDBGridEhCrack(DBGridEh1).InstantReadRecordEnter(Cell.Y - DBGridEh1.TopDataOffset);
try
Column := DBGridEh1.Columns[TDBGridEhCrack(DBGridEh1).RawToDataColumn(Cell.X)];
Label1.Caption := Column.DisplayText;
finally
TDBGridEhCrack(DBGridEh1).InstantReadRecordLeave;
end;
end;
end else
Label1.Caption := '';
end;
Best regards
Admin