怎样返回当前焦点在DbGrid中的第几行第几列?(100分)

  • 主题发起人 主题发起人 greenwon
  • 开始时间 开始时间
G

greenwon

Unregistered / Unconfirmed
GUEST, unregistred user!
即在DbGrid中当前光标所在的位置。
 
dbgrid.selectedindex是烈数
 
行数的话应该是结果集的行数吧
GRID自身的行数是没有什么意义的
 
HTGOAL:
是我要的答案了。谢谢!
 
type TGridCoord = record

X: Longint;
Y: Longint;
end;

function MouseCoord(X, Y: Integer): TGridCoord;

得到行和列Returns the row and column indexes of the cell that contains a point specified in screen coordinates.
Cell: TGridCoord;
Cell := MouseCoord(XPos, YPos);
 

Similar threads

后退
顶部