TDBGrid CellClick problem lazarus / 16-Databases ---------------------------------------------------------------------- xinyiman · 2010-04-20 05:33 Then I ask a question, because when a TDBGrid connected to a DBF file if I click on a cell moves me more often displaying the grid at the bottom! ---------------------------------------------------------------------- christensen · 2010-05-04 14:48 i don't know if i understand the question, so you get the result from the bottom of the grid?the last records from database? how you make to display the records from grid? which of them use: Code: [Select]TDBGrid.SelectedField.DisplayText; or Code: [Select]SQLQuery.Fields[0].asString; both are displaying some records, the first one display the clicked cell value, which if you have more cells will represent a problem because after select you need to compare all fields to make another query and can make mistake in case if the same record is stored in different fields. the only way to make it unique is to use the primary field (ID) and this you can achieve whit Code: [Select]SQLQuery.Fields[0].asString; or Code: [Select]SQLQuery.FieldByName('id').AsString i hope i understand your question. ---------------------------------------------------------------------- jesusr · 2010-05-04 18:58 Quote from: xinyiman on April 20, 2010, 07:33:06 amThen I ask a question, because when a TDBGrid connected to a DBF file if I click on a cell moves me more often displaying the grid at the bottom!  Please submit a bug report with a sample project.