Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IWGrid ScrollToCurrentRow
#3
Property grdContent.ScrollToCurrentRow = True.

After clicking on the "Fill Grid" button, grid is filled with 50 rows and CurrentRow is set to 40.
But it keeps showing the top of the grid.
I have tried it sync and async, but result stays the same.

procedure TIWForm1.btnClearGridAsyncClick(Sender: TObject;
  EventParams: TStringList);
begin
  grdContent.Clear;
end;

procedure TIWForm1.btnFillGridAsyncClick(Sender: TObject;
  EventParams: TStringList);
begin
  FillContentGrid(40);
end;

procedure TIWForm1.FillContentGrid(ActiveRow: Integer);
var
  r, c: Integer;
begin
  grdContent.Clear;
  grdContent.ColumnCount := 5;
  grdContent.RowCount := 50;
  For r := 0 To 49 Do
  Begin
    For c := 0 To 4 Do
    Begin
      grdContent.Cell[r, c].Text := 'Cell(' + IntToStr® + ',' + IntToStr© + ')';
    End;
  End;
  grdContent.CurrentRow := ActiveRow;
  grdContent.ScrollToCurrentRow := True;
end;
Reply


Messages In This Thread
IWGrid ScrollToCurrentRow - by PaulWeem - 12-14-2021, 09:41 AM
RE: IWGrid ScrollToCurrentRow - by kudzu - 12-20-2021, 08:52 PM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 12-21-2021, 11:56 AM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 04-05-2022, 01:19 PM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 06-14-2023, 10:23 AM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 12-23-2021, 10:22 PM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 02-03-2022, 03:45 PM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 07-10-2023, 12:08 PM
RE: IWGrid ScrollToCurrentRow - by PaulWeem - 07-11-2023, 08:58 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)