# Context Menu Data Binding to Hierarchical Data

This article explains how to bind the Context Menu for Blazor to hierarchical data.
Before continuing, make sure you are familiar with the [context menu data binding basics](https://www.telerik.com/blazor-ui/documentation/components/contextmenu/data-binding/overview).

Hierarchical data means that the collection of child items is provided in a field of its parent's model. By default, this is the `Items` field. If there are items for a certain node, it will have an expand icon. The `HasChildren` field can override this, however, but it is not required for hierarchical data binding. Note that all menu item models must be of the same type.

This approach of providing nodes lets you gather separate collections of data for certain sections or areas. Check out the [Know The Target And Adjust Items](https://www.telerik.com/blazor-ui/documentation/components/contextmenu/integration#know-the-target-and-adjust-items) example to see one way of altering the data (items) in the menu before showing it.

> caption Example of using hierarchical data in a context menu

<demo metaUrl="client/contextmenu/data-binding/hierarchical-data/" height="300"></demo>

> caption The result from the code snippet above, after hovering the "Company" item

![Blazor Context Menu Hierarchical Data](https://www.telerik.com/blazor-ui/documentation/assets/f14986f4c5ae788a59f4f2a0d9f13dd8/context-menu-hierarchical-data-overview.png)

## See Also

* [Context Menu Data Binding Basics](https://www.telerik.com/blazor-ui/documentation/components/contextmenu/data-binding/overview)
* [Live Demo: Context Menu](https://demos.telerik.com/blazor-ui/contextmenu/overview)
* [Binding to Flat Data](https://www.telerik.com/blazor-ui/documentation/components/contextmenu/data-binding/flat-data)
