How do you add a row after last row in DBGrid with DBNavigator? lazarus / 16-Databases ---------------------------------------------------------------------- paulkp · 2014-03-03 11:52 Have you noticed that it doesn't SEEM possible to add a row after last row in DBGrid with DBNavigator? But there must be some strange set of settings so that I can . . surely? ---------------------------------------------------------------------- LacaK · 2014-03-03 12:03 hm, when you click "Insert" button, then dataset.Insert is called (so no Append but Insert). It is hardcoded into TDBNavigator. You can try use BeforeAction event on TDBNavigator and call dataset.Append before TDBNavigator itself will call Insert (but it is only hack) ---------------------------------------------------------------------- taazz · 2014-03-03 12:15 pressing the last button and then the Next button should append a record if memory serves me right. ---------------------------------------------------------------------- paulkp · 2014-03-03 12:23 LacaK Thanks, Ill consider it . . taazz No, it doesn't. Pressing the last button and then clicking + still puts a row BEFORE the last row . . ---------------------------------------------------------------------- taazz · 2014-03-03 12:25 I didn't say + I said Next ---------------------------------------------------------------------- paulkp · 2014-03-03 13:45 Same prob with Next. I'm getting used to arrowing down to add a record . . ---------------------------------------------------------------------- taazz · 2014-03-03 14:14 you do know that you can create your own dbnavigator fast using an action list right? If not just drop a TActionList on the form open the list editor and on new action tool button open the drop down menu and select "new standard action" walk down the list until you encounter the database group and add all the actions on the list set the dataset of the actions drop a toolbar on the form and add as many buttons as the action link the actions to the buttons and you are ready to go. Of course now you can add the append command you miss from the db navigator, change the button images, add captions and whatever you might need. In your case I would try to create and register a new action for the append just to see how easy it is to do something along those lines. ---------------------------------------------------------------------- paulkp · 2014-03-03 14:16 Thanks. I'll consider . . (It's an in-house tool so wanted it simple but we use it a lot) ---------------------------------------------------------------------- apexcol · 2018-12-12 15:11 This is a better implementation.  Only put a CheckBox on your form. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  THackDBNav = class(TDBNavigator); procedure TForm1.DBNavigatorAppendClick(Sender: TObject);var  DBNav: THackDBNav;begin  DBNav := THackDBNav(TControl(Sender).Parent);  if Assigned(DBNav.DataSource) and (DBNav.DataSource.State <> dsInactive) then begin    if Assigned(DBNav.BeforeAction) then      DBNav.BeforeAction(DBNav, nbInsert);       if CheckBox1.Checked then      DBNav.DataSource.DataSet.Append      else        DBNav.DataSource.DataSet.Insert;             if Assigned(DBNav.OnClick) then      DBNav.OnClick(DBNav, nbInsert);  end;end; procedure TForm1.FormCreate(Sender: TObject);begin  THackDBNav(DBNavigator1).Buttons[nbInsert].OnClick := @DBNavigatorAppendClick;end; ---------------------------------------------------------------------- wp · 2018-12-12 16:30 Quote from: paulkp on March 03, 2014, 12:52:31 pmHave you noticed that it doesn't SEEM possible to add a row after last row in DBGrid with DBNavigator? Maybe the Option "dgDisableInsert" is not checked? I have a project here where the arrow down in the last row DOES add an empty row if that option is enabled.