用下面的函数应该可以
TWrapGrid =class(TCustomGrid);
function GetColRectText(DBGrid: TDBGrid): string;
var
MCoord: TGridCoord;
P: TPoint;
begin
GetCursorPos(P);
P := DBGrid.ScreenToClient(P);
MCoord := DBGrid.MouseCoord(P.X, P.Y);
if (MCoord.X >= 0) and (MCoord.Y >= 0) then
Result := TWrapGrid(DBGrid.Text;
end;