ScrollSynch does not work


I need visible scrolling during use the vertical scrollbars.
Why ScrollSynch does not work?
I use ADO, ADODataset or ADOQuery.

Kind regards

J. Reiber

We have been able to reproduce this issue here and we're investigating to find a solution for this.

I'm having the same issue. I've tried various combinations of PageMode, ScrollSync, and ScrollProportional. My datasource is a MyDAC component (mySQL database). When arrowing down the vertical scroll bar just bumps up and down in a 50pixel area... Generally the scrolling seems very jumpy and the scrollbar does not accurately reflect the position is the dataset queried when in pagemode. This is inconsistent with our former component and would be extremely off-putting to our users and prospective clients.

How soon can this be resolved?


It is by design that when PageMode = true, the scrollbar has 3 states : begin/center/end. This is because in PageMode = true, the grid only gets & shows the visible records from the dataset. The dataset will only return the state BOF,EOF, not an exact record index, so it is impossible in this mode to show an accurate scrollbar. If you need an accurate scrollbar position, please set PageMode = false.

Hi Bruno, the problem we're running into is that PageMode=True results in a meaningless scroll bar (from the end-users perspective), and PageMode=False results in a dataset that is permanently EOF once the grid is visible and ready for use. The problem with this condition is that users cannot double-click on a row and drill into another area with related information (contained in the initial query/dataset but not displayed in the grid) Is there a switch or preference that I'm missing in code?

To synchronize the DB cursor when a cell is clicked in the grid when PageMode = false, implement:

procedure TForm4.DBAdvGrid1SelectCell(Sender: TObject; ACol, ARow: Integer;
  var CanSelect: Boolean);
  dataset.MoveBy(ARow - DBAdvGrid1.FixedRows);

Will this solution still work if the grid's sort or filter options are utilized?

With this simple code, it won't. You could add a column with the key field and perform a Locate based on the key field value of the row clicked.