DBgrid in New-Record Mode lazarus / 16-Databases ---------------------------------------------------------------------- Edson · 2016-03-09 17:20 I have a DBGrid connected to a DB. I know I can move the cursor down, below the last line in order to let me add a new row to the table. But How can I do this by code? I mean, set the DBGrid in New-Record mode. And, What is the corect way to delete a row of a DBGrid? I know this means delete a row from the table. I'm using a TDbf connection, so I don't have TSQLQuery component. ---------------------------------------------------------------------- miab3 · 2016-03-09 18:23 DataSet.Append; DataSet.Delete; Michal ---------------------------------------------------------------------- Edson · 2016-03-09 18:44 Quote from: miab3 on March 09, 2016, 07:23:39 pmDataSet.Append; DataSet.Delete; Michal Good. It really works. But I'm still a bit confused about commiting the changes. Is it needed to do "Post" or something like this, to commit the changes?. I have seen: * Deleting rows in the DBGrid, automatically commit the changes to the Table. * Adding a new row in the DBGrid (and filling the fields), DOESN NOT commit the changes to the table. I was expecting a regular behaviour in the DBGrid, about changes. ---------------------------------------------------------------------- miab3 · 2016-03-09 18:59 Because after Append(or Insert) is required DataSet.Post(or Next or Prior) and we have to work in AutoCommit mode (the default for ZEOS). Michal ---------------------------------------------------------------------- Edson · 2016-03-09 19:24 OK. I see. This is the modus-operandi for DBGrid. Thanks.