Save my data when cursor (selectbar) is moving to another row lazarus / 21-General ---------------------------------------------------------------------- mangakissa · 2021-02-15 13:35 When I move my selectbar to another row in TDBGrid it save the current record before the selectbar is moved. Now I have my Tstringgrid filled with records of my own object. How do I tell the Tstringgrid that a procedure must be run, before my selectbar is going to another row. ---------------------------------------------------------------------- marcio2003 · 2021-02-15 14:16 Try to put your desired statement block into your TStringGrid.BeforeSelection event. ---------------------------------------------------------------------- wp · 2021-02-15 15:47 The event OnSelectCell fires when a new cell is selected, but before it becomes the selected one; it has a parameter CanSelect in which you even can prevent changing the active cell. Therefore, OnEditingDone comes afterwards when it is clear that the active cell position has changed. ---------------------------------------------------------------------- mangakissa · 2021-03-02 08:56 Beforeselection can do the trick. But for now I can't get it working as I want. For now I use TStringgrid only for displaying and TEdit for inserting. Thanks for thinking.