Hello,
Open file NxCustomGridControl.pas and change procedure:
procedure TNxCustomGridControl.RefreshRowGrid(const Index: Integer);
into:
CODE
procedure TNxCustomGridControl.RefreshRowGrid(const Index: Integer);
var
TotalRect: TRect;
begin
case FGridStyle of
gsReport: TotalRect := GetRowRect(Index);
gsSlides: TotalRect := GetSlideRect(Index);
end;
TotalRect.Top := TotalRect.Bottom - 1;
TotalRect.Bottom := TotalRect.Top + GridSpace[lpBottom];
InvalidateRect(Handle, @TotalRect, False);
end;
open NxGrid.pas and change procedure
procedure TNextGrid.AddRow(Count: Integer = 1);
into
CODE
procedure TNextGrid.AddRow(Count: Integer = 1);
var
I, J, PrevCount: Integer;
begin
if (Count < 1) then Exit;
PrevCount := RowCount;
FCells.AddRow(Count);
if goUseDefaultValues in Options then { using default values may slow down adding rows }
begin
for I := RowCount - Count to RowCount - 1 do
for J := 0 to Columns.Count - 1 do
if Columns[J].DefaultValue <> '' then Cells[J, I] := Columns[J].DefaultValue;
end;
if (GridLinesStyle = lsFramed) and (goGrid in Options)
and (RowCount > 1) and (PrevCount > 0) then RefreshRowGrid(PrevCount - 1);
RefreshRowGrid(RowCount - 1);
FLastAddedRow := RowCount - 1;
{ refresh added items }
if UpdateCount = 0 then RefreshVisibleRows(RowCount - Count, RowCount - 1);
UpdateVertScrollBar;
end;
regards