procedure TForm1.nomer_edKeyPress(Sender: TObject; var Key: char);
begin
if Key = #13 then //Enter
begin
with dbgrid1.DataSource.DataSet do
begin
first;
while not eof do
begin
if dbgrid1.Columns[0].Field.AsString = nomer_ed.Text then
dbgrid1.SelectedRows.CurrentRowSelected:=true ;
next;
end ;
end;
I tried this code but still no luck now it selects only the last row from DBGrid1, no matter what I enter in the nomer_ed.Text
If someone has any other ideas why this is not working please help.
Thank you