hello,
what is exactly for ?
is it to find next parent or to find next record on same level ?
need help on getnextsibling
Started by chris, Apr 06 2006 01:05 PM
5 replies to this topic
#1
Posted 06 April 2006 - 01:05 PM
#2
Posted 06 April 2006 - 06:44 PM
Hi,
Returns the next row (if any) with the same indent level and attached to the same parent.
So from the parent's view it's the next child (if any).
Returns the next row (if any) with the same indent level and attached to the same parent.
So from the parent's view it's the next child (if any).
G.W. van der Vegt
#3
Posted 06 April 2006 - 06:54 PM
so it's not working
try to do this
parent1
child1
parent2
child2
if you put cursor on child1 the function return row 3 (child2) instead of -1
O btw i think i detected the sam error of you, when i expand manualy by clicking a node and then do a searchnext the cursor is on a correct position but i cant see it, obliged to roll up the grid.
try to do this
parent1
child1
parent2
child2
if you put cursor on child1 the function return row 3 (child2) instead of -1
O btw i think i detected the sam error of you, when i expand manualy by clicking a node and then do a searchnext the cursor is on a correct position but i cant see it, obliged to roll up the grid.
#4
Posted 06 April 2006 - 09:10 PM
Hello,
I have fix it. If you have a source, open NxGrid.pas, find TNextGrid.GetNextSibling and change it to:
regards[/code]
I have fix it. If you have a source, open NxGrid.pas, find TNextGrid.GetNextSibling and change it to:
CODE
function TNextGrid.GetNextSibling(const Index: Integer): Integer;
var
i: Integer;
begin
Result := -1;
for i := Index + 1 to Pred(RowCount) do
if GetLevel(i) >= GetLevel(Index) then
begin
if GetLevel(i) = GetLevel(Index) then
begin
Result := i;
Break;
end
end else Exit; // <---------- New
end;
var
i: Integer;
begin
Result := -1;
for i := Index + 1 to Pred(RowCount) do
if GetLevel(i) >= GetLevel(Index) then
begin
if GetLevel(i) = GetLevel(Index) then
begin
Result := i;
Break;
end
end else Exit; // <---------- New
end;
regards[/code]
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.
--
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.
#5
Posted 07 April 2006 - 10:14 AM
thank you boki, is it the same for getprevsibling ?
#6
Posted 07 April 2006 - 09:13 PM
Hello,
Yes it is.
regards
Yes it is.
regards
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.
--
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











