Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scroll a dbgrid

Status
Not open for further replies.

DelphiAaron

Programmer
Jul 4, 2002
826
AU
is there a way to scroll a dbgrid without moving the selected record.

Aaron
 
I don't think so since scrolling the list changes the selected record. And there is no "OnSelect" event in TTable or TDBGrid. You could set a Bookmark in "OnCellClick", but you'd need button or something to return to the bookmarked record. You could create toggle-button to set the bookmark on first click, then return to that record on next click.
I've never used it, but look at DBGrid.Options.dgAlwaysShowSelection : "The selected cell displays the focus rectangle even when the grid does not have focus."

Roo
Delphi Rules!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top