Set Recordnumber in DBgrid lazarus / 16-Databases ---------------------------------------------------------------------- madref · 2024-06-12 22:56 With the following code you can see what record is selected in the dataset. 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 DBGrid.DataSource.DataSet.RecNoHow can I go to that recordnumber after a refresh without using the following code: 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 Q_Evaluaties.Locate('ID;TBL', VarArrayOf([Save_ID, Save_RL]), []); ---------------------------------------------------------------------- madref · 2024-06-17 20:44 Any one??? ---------------------------------------------------------------------- cdbc · 2024-06-17 21:30 Hi IIRC TDataset implements 'Bookmarks', as I remember they're easy to use... Try looking it/them up, they've been there since Delphi 2 edit: Just looked it up in 'TDataset', it's a property of TDataset, of type 'TBookmark'; you set a local/tmp variable equal to it -> do your refresh -> then set it back again: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 var tmpBkMrk: TBookmark;begin  ...  tmpBkMrk:= myDataset.Bookmak;  myDataset.Refresh; // or something like that  myDataset.Bookmark:= tmpBkMrk;  ...end; HTH Regards Benny