# Deleting TreeView Nodes

## Environment

<table>
    <tbody>
        <tr>
            <td>Product Version</td>
            <td>9.0.0</td>
        </tr>
        <tr>
            <td>Product</td>
            <td>Progress® KendoReact TreeView</td>
        </tr>
    </tbody>
</table>

## Description

Can I delete TreeView Nodes?

## Solution

Create custom item rendering through TreeView's "item" property. Define the custom item outside of the main component.

Since the delete function will be within the main component where the TreeView is rendered, use React Context for passing reference to the function to the nodes. Within the custom item add a delete icon/button and on its onClick event, return the props (where the item info is accessible).

Following is an example demonstrating the approach:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/treeview/treeview-deleting/source.txt)
