# Reorder Nodes

This topic provides details about using methods and classes used in re-ordering nodes in TreeView.

## Content

In TreeView, you can programmatically reorder nodes using the [Move](/componentone/docs/win/online-treeview/) method of the [C1TreeNodeCollection](/componentone/docs/win/online-treeview/) class. The [Move](/componentone/docs/win/online-treeview/) method can be used with the Nodes collection of either [C1TreeView](/componentone/docs/win/online-treeview/) or [C1TreeNode](/componentone/docs/win/online-treeview/). It allows you to move a node from its old position to a new position. The method accepts two parameters, oldIndex and newIndex of the Integer type. Here oldIndex and newIndex specify the old and the new position of the node respectively. The Move method, however, cannot be used to move a child node from one parent node to another.

The following code snippets moves Child1 from index 0 to index 2 in Parent1.

```vbnet
' move a node from its old position to a new position
parentNode1.Nodes.Move(0, 2)
```

```csharp
// move a node from its old position to a new position
parentNode1.Nodes.Move(0, 2);
```

Here is an image showing the same.

![Reordering nodes](https://cdn.mescius.io/document-site-files/images/56bb69d1-e225-4d79-8965-f70a0e789043/images/reorderingnodes.png)