# AddExpandedRows(TreeViewItem, IList<TreeViewItem>)

> Adds the expanded rows of the full tree to the input list. Only use this method if a full tree was built in BuildRoot.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.7/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Removed.** TreeView is now deprecated. You can likely now use TreeView\\\<int\\> instead and not think more about it. But if you were using that identifier to store EntityId data, you should instead opt to upgrade your TreeViews to use TreeView\\\<EntityId\\> to get the proper typing.

```csharp
protected void AddExpandedRows(TreeViewItem root, IList<TreeViewItem> rows)
```

### Parameters

**** (\[TreeViewItem]\(/engine/6000.7/script-reference/unityeditor/imgui/controls/treeviewitem)): Root of the TreeView.**** (\[IList\<TreeViewItem>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1)): Rows that will be refilled using the expanded state of TreeView.

### Remarks

Note that the rows list will not be cleared before adding items.

Additional Resources: [TreeView.BuildRoot](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview/buildroot.md), [TreeView.BuildRows](/engine/6000.7/script-reference/unityeditor/imgui/controls/treeview/buildrows.md).
