Jump to content


Bug in AddChildRow

  • Please log in to reply
No replies to this topic

#1 bosjo

  • Members
  • 65 posts
  • Gender:Male
  • Location:Märsta, Sweden

Posted 15 April 2012 - 11:10 AM

I think there is a bug in the beginning of TNextGrid.AddChildRow; the problem is that "children of children" are not counted.

I have tried to fix it as follows:

procedure TNextGrid.AddChildRow(const Index: Integer;
Position: TChildRowPosition);
  Pos, Col: Integer;
  case Position of
    crFirst: Pos := Index + 1;
// else Pos := Index + Row[Index].ChildCount + 1;
    else Pos := Index + Row[Index].FamilyCount + 1;

and adding this new property FamilyCount to the TRow class (see attached file).

PS. "OffspringCount" maybe is a more accurate variable name...?

Attached Files

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users