Jump to content


Photo

Bug report

AddChindRow crLast

  • Please log in to reply
5 replies to this topic

#1 David Wu

David Wu
  • Members
  • 9 posts

Posted 06 November 2015 - 10:15 PM

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.

 

Attached Files


My computer native language is Pascal.

#2 David Wu

David Wu
  • Members
  • 9 posts

Posted 07 November 2015 - 04:48 PM

HI Boki

I had tested a lot. something wrong is in the ChildCount.

and I had reviewed the code in the component, I guess that the ChildCount may not be received some notify after Row changing.

Now i have to AddChildRow with crFirst, and then move it to where it should be.


My computer native language is Pascal.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,194 posts
  • Gender:Male

Posted 07 November 2015 - 10:46 PM

Hi David,

 

I will inspect it and fix it.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 David Wu

David Wu
  • Members
  • 9 posts

Posted 09 November 2015 - 10:33 PM

HI Boki

Another bug, When ClearSelection, SelectedRow still keep its value, which was not what we want: set it to -1 


My computer native language is Pascal.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,194 posts
  • Gender:Male

Posted 11 November 2015 - 09:54 AM

I will fix it too.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 David Wu

David Wu
  • Members
  • 9 posts

Posted 19 November 2015 - 02:03 AM

Bug:

after save and load the tree column loss the tree structure.


My computer native language is Pascal.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users