Abaksoft Posted February 15, 2025 Posted February 15, 2025 Hi Experts, I have a MainmForm with a UnimDBListGrid. After updating DataSet On Disclose, it is obvious to go to the current DataSet freshly updated. GotoBookmark does its job, but as the mainForm is scrollable, i can't go to the current VertScrollBar.ScrollPos (position). So, how to get and set a MainmForm.VertScrollBar (with JavaScript) ? Thx. Edited : Forget this topic ! I realized that I wasn't using the right design. The good practice is : 1. OnDisclose > ShomModal Form to Edit Record, then after MrOK 2. procedure TfrmClient.ShowCallBack(Sender: TComponent; Res: Integer); begin if res=1 then begin myDataSet.RefreshRecord; UnimDBListGrid1.RefreshCurrentRow(False); // False = not full reload Data end; end; With this : UnimDBListGrid1 refresh the Current record and preserves its position, even with a large VertScrollBar Position. 1
Recommended Posts