Jump to content

Recommended Posts

Posted

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.

  • Upvote 1
×
×
  • Create New...