HI
When Call AddChindRow with crLast, the component makes some order error, sometimes it doesn't add the row at last, but any random place.
I make a little bit change of the Tree demo program, only add an integer to the cell text, like this:
procedure TForm2.Button2Click(Sender: TObject);
begin
if CheckBox2.Checked
then NextGrid1.AddChildRow(NextGrid1.SelectedRow, crLast)
else NextGrid1.AddChildRow(NextGrid1.SelectedRow, crFirst);
Count := Count + 1;
NextGrid1.Cell[2, NextGrid1.LastAddedRow].AsString := 'Child Row'+IntToStr(Count);
NextGrid1.Cell[3, NextGrid1.LastAddedRow].AsInteger := Random(100);
end;
after you adding a few rows and childrows into it, error will be coming.
My computer native language is Pascal.