-
Notifications
You must be signed in to change notification settings - Fork 25
Move Nodes
David West edited this page Aug 29, 2016
·
3 revisions
public virtual void MoveToParent(TId parentId, int? insertIndex = null)
The first parameter identifies the target parent by entity id.
The second, optional parameter allows the moving node to be inserted at a particular child order index. If it is specified and greater than the current number of children, the node is added as the last child.
public virtual void MoveToAdjacentPosition(TId targetId, Adjacency adjacency)
The first parameter identifies the target node by entity id.
The following shortcut methods exist:
void MoveToPositionBefore(TId targetId)
void MoveToPositionAfter(TId targetId)
There are two additional methods that can make it even easier to move a node among its current siblings:
public virtual void IncrementSiblingPosition()
public virtual void DecrementSiblingPosition()