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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get active row in a TDBGrid 1

Status
Not open for further replies.

MatthiasB

IS-IT--Management
Oct 19, 2002
72
DE
Hi experts,

was searching quite some time and thought this is quite a common thing, but I cannot figure this out in online help, book, or web - so asking here ;-)

I have a TDBGrid and the usual stuff (TIBDataSet, TIBDatabase, TIBTransaction, TDataSource) to connect IBDataSet.SelectSQL to an InterBase DB. All works fine, can change queries interactively, but... how do I determine which record is the selected in the grid, so I can start and edit screen for that selected record? I have DBGrid's multiselect set to false, just in case this is important.

Thanks!
MatthiasB
 
When a record is selected, that record becomes the current record of the table, so to open a detail screen, use the normal functions like Query1.GetFieldByName to retrieve the "selected" record's field values. Cheers,
Nico
 
Hi Nico,

thanks! Works perfectly.

Cheers,
Matthias
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top