Hi guys,
Please tell me does this complete fix works?
procedure TNxCustomGridControl.PaintReportRows;
var
I, Limit, Indent, ARowCount, RowHeight: Integer;
Done, Clipped: Boolean;
CellRect: TRect;
DrawPos: TPoint;
begin
{ Start Pos }
DrawPos := GetBodyRect.TopLeft;
Limit := GetBodyRect.Top;
Done := False;
FLastRow := FFirstRow;
ARowCount := RowCount;
while not Done do
begin
if FLastRow < ARowCount then
begin
if GetRowVisible(FLastRow) then
begin
{ Note: Prevent multiple calls
of OnMeasureRowHeight }
RowHeight := GetRowHeight(FLastRow);
for i := 0 to Pred(Columns.Count) do
begin
with Columns.PositionItem[i] do
begin
if I >= FFixedCols then Indent := HorzScrollBar.Position else Indent := 0;
DrawPos.X := Left - Indent;
Clipped := (I >= FFixedCols) and (DrawPos.X + Width < GetFixedWidth);
DrawPos.X := Left - Indent;
if Visible
and not Clipped
and (DrawPos.X <= ClientWidth)
and (DrawPos.X + Width >= 0) then
begin
CellRect := Bounds(DrawPos.X, DrawPos.Y, Width, RowHeight);
if IntegralHeight
and (limit + RowHeight + GridSpace[lpBottom] > GetBodyRect.Bottom)
then DrawEmptyCell(Index, FLastRow, CellRect)
else DrawCell(Index, FLastRow, CellRect);
end;
end;
end;
if goIndicator in Options then
begin
DrawRowIndicator(FLastRow, (FLastRow = SelectedRow) and (not InputSelected), (not InputSelected) and ((Selected[FLastRow]) or (FLastRow = SelectedRow)));
end;
Inc(Limit, RowHeight + GridSpace[lpBottom]);
Inc(DrawPos.Y, RowHeight + GridSpace[lpBottom]);
end;
Inc(FLastRow);
end
else
begin
RowHeight := GetRowHeight(FLastRow);
for i := 0 to Pred(Columns.Count) do
with Columns.PositionItem[i] do
begin
if i >= FFixedCols
then Indent := HorzScrollBar.Position
else Indent := 0;
DrawPos.X := Left - Indent;
Clipped := (I >= FFixedCols) and (DrawPos.X + Width < GetFixedWidth);
if Visible
and not Clipped
and (DrawPos.X <= ClientWidth)
and (DrawPos.X + Width >= 0) then
begin
CellRect := Bounds(DrawPos.X, DrawPos.Y, Width, RowHeight);
DrawEmptyCell(Index, FLastRow, CellRect);
end;
end;
if goIndicator in Options
then DrawRowIndicator(FLastRow, False, False);
Inc(FLastRow);
Inc(DrawPos.Y, RowHeight + GridSpace[lpBottom]);
Inc(Limit, RowSize + GridSpace[lpBottom]);
end;
{ Escape loop }
if Limit > GetBodyRect.Bottom
then Done := True;
end;
if goSelectFullRow in Options
then DrawFocusCell;
end;
I will include it in next fix.