I'm experiencing strange behaviour of NextGrid (version 5.4.1) related to the Down Arrow key.
It just does not let me reach the latest visible row. Please check the attached sample project.
Thanks & Regards,
Jan
Posted 04 September 2011 - 11:48 AM
Posted 05 September 2011 - 08:11 PM
Posted 06 September 2011 - 01:12 AM
if FCells.Row[Index].Shown and (Pos > FLastVisibleRow)
then FLastVisibleRow := Pos;Posted 06 September 2011 - 02:57 PM
procedure TNextGrid.AddChildRow(const Index: Integer;
Position: TChildRowPosition);
var
Pos, j: Integer;
begin
case Position of
crFirst: Pos := Index + 1;
else Pos := Index + FCells.GetChildCount(Index) + 1;
end;
FCells.AddChildRow(Index, Pos);
if goUseDefaultValues in Options then { using default values may slow down adding rows }
begin
for J := 0 to Columns.Count - 1 do
if Columns[J].DefaultValue <> '' then Cells[J, Pos] := Columns[J].DefaultValue;
end;
if FCells.Row[Index].Shown and (Pos > FLastVisibleRow) { fix down arrow issue }
then FLastVisibleRow := Pos;
if not IsUpdating then
begin
if FCells.Row[Index].Expanded then
ShowRow(Pos, RowSize, True);
if FCells.Row[Index].ChildCount = 1 then
RefreshRow(Index);
end;
FLastAddedRow := Pos;
UpdateVertScrollBar;
end;
Posted 06 September 2011 - 03:12 PM
Posted 06 September 2011 - 04:07 PM
procedure TNextGrid.AddChildRow(const Index: Integer;
Position: TChildRowPosition);
var
Pos, j: Integer;
begin
case Position of
crFirst: Pos := Index + 1;
else Pos := Index + FCells.GetChildCount(Index) + 1;
end;
FCells.AddChildRow(Index, Pos);
if goUseDefaultValues in Options then { using default values may slow down adding rows }
begin
for J := 0 to Columns.Count - 1 do
if Columns[J].DefaultValue <> '' then Cells[J, Pos] := Columns[J].DefaultValue;
end;
if not IsUpdating then
begin
if FCells.Row[Index].Expanded then
ShowRow(Pos, RowSize, True);
if FCells.Row[Index].ChildCount = 1 then
RefreshRow(Index);
end;
{ Update FLastVisibleRow }
if FCells.Row[Index].Shown and (Pos > FLastVisibleRow)
then FLastVisibleRow := Pos;
FLastAddedRow := Pos;
UpdateVertScrollBar;
end;
Posted 07 September 2011 - 12:28 AM
{ Update FLastVisibleRow }
if FCells.Row[Pos].Shown and (Pos > FLastVisibleRow) // <------- modified
then FLastVisibleRow := Pos;Posted 07 September 2011 - 12:26 PM
Posted 07 September 2011 - 07:13 PM
Posted 08 September 2011 - 10:29 PM
Posted 08 September 2011 - 11:56 PM
Grid.Row[i].Expanded := false;with
Grid.Expanded[i] := false;, then all level 2 children remain visible.
Posted 09 September 2011 - 12:20 AM
Posted 09 September 2011 - 01:26 AM
Posted 09 September 2011 - 02:01 AM
Posted 09 September 2011 - 11:41 PM
Posted 10 September 2011 - 11:53 AM
if Row[Pos].Shown then
begin
{ Update FLastVisibleRow }
if Pos > FLastVisibleRow
then FLastVisibleRow := Pos;
end else Inc(FLastVisibleRow);
Posted 10 September 2011 - 03:40 PM
Posted 10 September 2011 - 11:27 PM
Posted 11 September 2011 - 12:06 AM
Posted 11 September 2011 - 01:08 AM
0 members, 1 guests, 0 anonymous users