Recent

Author Topic: DBNavigator  (Read 2606 times)

xaver13

  • Full Member
  • ***
  • Posts: 111
DBNavigator
« on: January 15, 2019, 06:34:26 pm »
Hello, I discovered DBNavigator. When I tried to use it, it looks nice.
But when I try to insert line in my DBgrid, it did not insert line after the last line but .... somewhere, and .. the changes  was shown, but not stored at the end. Even I use "post" button.
Please does anybody know where could be  problems? Should I fill some code somewhere? Is there any tutorial, how to use it properly?

I am not alone who has problem with insert ... I found 4 years old thread http://forum.lazarus.freepascal.org/index.php/topic,23800.msg304705.html#msg304705 here.

Thank you very much for reply.
--
Jiri Cvrk

KoBraSoft

  • New Member
  • *
  • Posts: 20
Re: DBNavigator
« Reply #1 on: January 15, 2019, 07:57:38 pm »
Try this:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TDBNavButtonType);
  2. begin
  3.   if Button = nBInsert then
  4.       (Sender as TDBNavigator).DataSource.Dataset.Append;
  5. end;

in OnClick event.

Konrad

 

TinyPortal © 2005-2018