VirtualGridMode: when using Showing := (Index mod 2) = 0; PageUp is not working anymore.
See source below and now it works. If this source is a better solution can you implement it?
function TNxListGridView6.GetFirstRowInPage: Integer; function FindFirstRowInPage: Integer; begin Result := FFirstIndex; while Result < RowCount do begin if Showing[Result] then begin Break; end; Inc(Result); end; end; begin if (VirtualMode) then Result := FindFirstRowInPage else Result := FFirstIndex; // Result := FFirstIndex; { TODO: Solve better FindFirstRowInPage for VirtualMode } // if VirtualMode then Result := FindFirstRowInPage else Result := FFirstIndex; end;
And the old one is not good because it's not looking at the first row in Page.
You can remove i think? Or rewrite it. That's better i think because i use something like this to calculate de Row center of the Page.
It's never been used in your sources.
///<summary></summary> ///<returns>Index of first row in Page</returns> ///<author>Eduard</author> function TNxGridView6.FindFirstRowInPage: Integer; var Count: Integer; begin { 8/28/16: Changed 0 to -1 } Result := -1; Count := 0; while Result < RowCount do begin Inc(Result); if Showing[Result] then begin Inc(Count); if Count > VertScrollBar.Position then Break; end; end; end;
Kind regards,
Eduard.