Hello,
i using a DBAdvGrid in Pagemode=false. After filling it with some data, i insert manually rows and adding nodes to them. Now i want to do this again. The problem occours if i contract all before adding additional rows+nodes. In this case, the new nodes and rows are shiftet by the collapsed row count of the first nodes.
I can't reproduce this on a new form in a blank DBAdvGrid without data connection.
Perhaps i do something wrong in the adding process?
The left case is the correct result.
I create both results with the following code.
The only difference is the ContractAll command.
AdvGridNAV.BeginUpdate;
AdvGridNAV.InsertRows(3,2,true);
AdvGridNAV.AddNode(2,3);
AdvGridNAV.EndUpdate;
// If you comment out this line, the case on the left will be created.
AdvGridNAV.ContractAll;
AdvGridNAV.BeginUpdate;
AdvGridNAV.InsertRows(8,2,true);
AdvGridNAV.AddNode(7,3);
AdvGridNAV.EndUpdate;
I also tried using “RealRowIndex” in the right case. This obviously leads to the right result, but it throws exceptions if the nodes are expanded/collapsed several times.
regards