{/* Do not edit this file. It is automatically generated by API Documenter. */}


## TreeOptions

Setting model for [TreeView](/refs/Class/TreeView) display

**Signature:**

```typescript
export interface TreeOptions
```

## Remarks

When setting it as an option in [TreeView](/refs/Class/TreeView), you only need to enter the necessary information.

## Example

 
```js
tree.setTreeOptions({lineVisible: false});
```

## Properties 

| Property | Type | Description |
| --- | --- | --- |
| [collapsedIcon](/refs/Interface/TreeOptions#collapsedicon) | number | Icon displayed when a tree item is collapsed |
| [collapseWhenCtrlKey](/refs/Interface/TreeOptions#collapsewhenctrlkey) | boolean | Whether to fold when the ctrl key and left arrow key are pressed together |
| [collapseWhenLeftKey](/refs/Interface/TreeOptions#collapsewhenleftkey) | boolean | Whether to fold when only the left arrow key is pressed |
| [defaultIcon](/refs/Interface/TreeOptions#defaulticon) | number | If the icon index of an item does not exist or exceeds the total number, the designated icon index |
| [expandedIcon](/refs/Interface/TreeOptions#expandedicon) | number | Icon displayed when tree item is expanded |
| [expanderIconStyle](/refs/Interface/TreeOptions#expandericonstyle) | [TreeExpanderIconStyle](/refs/realgrid#treeexpandericonstyle) | Specifies the shape of the Tree Expander icon |
| [expandWhenCtrlKey](/refs/Interface/TreeOptions#expandwhenctrlkey) | boolean | Whether to expand when pressing the ctrl key and the right arrow key together |
| [expandWhenRightKey](/refs/Interface/TreeOptions#expandwhenrightkey) | boolean | Whether to expand when the right arrow key is pressed |
| [expandWhenSetData](/refs/Interface/TreeOptions#expandwhensetdata) | [ExpandWhenSetData](/refs/realgrid#expandwhensetdata) | You can set whether to keep the existing expansion after set data. |
| [iconImages](/refs/Interface/TreeOptions#iconimages) | string\[\] | List of image files to use as icons |
| [iconImagesRoot](/refs/Interface/TreeOptions#iconimagesroot) | string | Path to image to use as icon |
| [iconVisible](/refs/Interface/TreeOptions#iconvisible) | boolean | tree icon visible |
| [lineVisible](/refs/Interface/TreeOptions#linevisible) | boolean | Tree line visibility |
| [recursiveDeleting](/refs/Interface/TreeOptions#recursivedeleting) | boolean | If the parent node is removed in softDeleting state, the state value of the child node changes to [RowState.DELETED](/refs/realgrid#rowstate){/* */}. |
| [showCheckBox](/refs/Interface/TreeOptions#showcheckbox) | boolean | Checkbox inside tree |
| [templateOptions](/refs/Interface/TreeOptions#templateoptions) | [TreeTemplateOptions](/refs/Interface/TreeTemplateOptions) \| undefined | Used when displaying an HTML tag in the first column of treeView. |

## Properties Desc

### collapsedIcon

Icon displayed when a tree item is collapsed

`Type` - number

<hr/>

### collapseWhenCtrlKey

Whether to fold when pressing the ctrl key and left arrow key together

`Type` - boolean

**Remarks:**

This works even if [collapseWhenLeftKey](/refs/Interface/TreeOptions#collapsewhenleftkey) is `false`.

<hr/>
 
### collapseWhenLeftKey

Whether to fold when only the left arrow key is pressed

`Type` - boolean

**Remarks:**
 
It should be located on the far left.

<hr/>

### defaultIcon

Icon index designated when the icon index of an item does not exist or exceeds the total number.

`Type` - number

<hr/>

### expandedIcon

Icon displayed when a tree item is expanded

`Type` - number

<hr/>

### expanderIconStyle

Specifies the shape of the Tree Expander icon

`Type` - [TreeExpanderIconStyle](/refs/realgrid#treeexpandericonstyle)

<hr/>

### expandWhenCtrlKey

Whether to expand when pressing the ctrl key and the right arrow key together

`Type` - boolean

**Remarks:**

This works even if [expandWhenRightKey](/refs/Interface/TreeOptions#expandwhenrightkey) is `false`.

<hr/>

### expandWhenRightKey

Whether to expand when the right arrow key is pressed

`Type` - boolean

**Remarks:**

It should be located on the far right.

<hr/>

### expandWhenSetData

Set whether to keep the existing expansion after setting data.

`Type` - [ExpandWhenSetData](/refs/realgrid#expandwhensetdata)

**Remarks:**

Applies only when setting data with [LocalTreeDataProvider.setRows()](/refs/Class/LocalTreeDataProvider#setrows) or [LocalTreeDataProvider.setCsvRows()](/refs/Class/LocalTreeDataProvider#setcsvrows){/* */}.

<hr/>

### iconImages

List of image files to use as icons

`Type` - string\[\]

<hr/>

### iconImagesRoot

Path to the image to use as the icon

`Type` - string

<hr/>

### iconVisible

tree icon visible

`Type` - boolean

<hr/>

### lineVisible

Whether to display tree lines

`Type` - boolean

<hr/>

### recursiveDeleting

If the parent node is removed in softDeleting state, the state value of the child node changes to [RowState.DELETED](/refs/realgrid#rowstate){/* */}.

`Type` - boolean

<hr/>

### showCheckBox

Checkbox inside tree
 
`Type` - boolean

<hr/>

### templateOptions

Used when displaying html tags in the first column of treeView.

`Type` - [TreeTemplateOptions](/refs/Interface/TreeTemplateOptions) \| undefined

<hr/>