DelPhi 编程问题,请高人指点!

来源:百度知道 编辑:UC知道 时间:2024/05/28 02:34:46
请问怎样在选择了DBgrid中的某一行后,根据行中的某以数据在数据库中查询并将查询结果显示在edt控件中呢?应该用dbgrid中的那一个事件呢?

dbgrid的事件在帮助里有的
Event Purpose
OnCellClick Occurs when a user clicks on a cell in the grid.
OnColEnter Occurs when a user moves into a column on the grid.
OnColExit Occurs when a user leaves a column on the grid.
OnColumnMoved Occurs when the user moves a column to a new location.
OnDblClick Occurs when a user double clicks in the grid.
OnDragDrop Occurs when a user drags and drops in the grid.
OnDragOver Occurs when a user drags over the grid.
OnDrawColumnCell Occurs when application needs to draw individual cells.
OnDrawDataCell (obsolete) Occurs when application needs to draw individual cells if State is csDefault.
OnEditButtonClick Occurs when the user clicks on an ellipsis button in a column.
OnEndDrag Occurs when a user stops dragging on the grid.
OnEnter Occurs when the grid gets focus.
OnExit Occurs when the grid loses focus.
OnKeyDown Occurs when a user presses any key or key combination on the keyb