# TreeViewComboBox

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](/api/wisej.web/general/control.md)
  * [ListControl](/api/wisej.web/lists-and-grids/listcontrol.md)
    * [ComboBox](/api/wisej.web/lists-and-grids/combobox.md)
      * [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md)
        * [TreeViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.treeviewcombobox.md)

The TreeViewComboBox control represents a [UserComboBox](/api/wisej.web/lists-and-grids/wisej.web.usercombobox.md) control with a [TreeView](/api/wisej.web/lists-and-grids/treeview.md) as the drop down panel.

{% tabs %}
{% tab title="C#" %}

```csharp
public class TreeViewComboBox : UserComboBox
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class TreeViewComboBox
    Inherits UserComboBox
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) TreeViewComboBox()

Initializes a new TreeViewComboBox control.

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the image-list index value of the default image that is displayed by the tree nodes. (Default: `-1`)

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The specified index is less than -1.

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageKey

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the key of the default image for each node in the [TreeView](/api/wisej.web/lists-and-grids/treeview.md) control when it is in an unselected state. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) ImageList

[ImageList](/api/wisej.web/content/imagelist.md): Returns or sets the [ImageList](/api/wisej.web/content/imagelist.md) that contains the [Image](https://docs.microsoft.com/dotnet/api/system.drawing.image) objects that are used by the tree nodes. (Default: `null`)

### ![](/files/hsR4ok3152WyAf8J2C1u) Nodes

[TreeNodeCollection](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenodecollection.md): Returns the collection of tree nodes that are assigned to the tree view control.

### ![](/files/hsR4ok3152WyAf8J2C1u) PrefetchItems

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the number of items to prefetch outside of the visible area when [VirtualScroll](#virtualscroll) is set to true. The default is 0 (disabled). (Default: `0`)

### ![](/files/hsR4ok3152WyAf8J2C1u) SelectedIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the index of the currently selected item.

**Throws:**

* [ArgumentOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.argumentoutofrangeexception) The specified index is less than -1; o the specified index is greater than the number of items in the combo box.

### ![](/files/hsR4ok3152WyAf8J2C1u) SelectedItem

[TreeNode](/api/wisej.web/lists-and-grids/treeview/wisej.web.treenode.md): Returns or sets the selected node in the drop down [TreeView](/api/wisej.web/lists-and-grids/treeview.md) control.

### ![](/files/hsR4ok3152WyAf8J2C1u) Text

[String](https://docs.microsoft.com/dotnet/api/system.string): Returns or sets the text associated with this control. (Default: `""`)

### ![](/files/hsR4ok3152WyAf8J2C1u) TreeView

[TreeView](/api/wisej.web/lists-and-grids/treeview.md): Returns the [TreeView](/api/wisej.web/lists-and-grids/treeview.md) control associated with this [TreeViewComboBox](/api/wisej.web/lists-and-grids/wisej.web.treeviewcombobox.md).

### ![](/files/hsR4ok3152WyAf8J2C1u) TreeViewNodeSorter

[IComparer\<TreeNode>](https://docs.microsoft.com/dotnet/api/system.collections.generic.icomparer-1): Returns or sets the implementation of [IComparer](https://docs.microsoft.com/dotnet/api/system.collections.icomparer) to perform a custom sort of the [TreeView](/api/wisej.web/lists-and-grids/treeview.md) nodes.

### ![](/files/hsR4ok3152WyAf8J2C1u) VirtualScroll

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables virtual scrolling for the [TreeView](#treeview). When virtual scrolling is enabled, only the visible nodes are rendered in the browser allowing the [TreeView](#treeview) to host virtually unlimited nodes without any performance loss. (Default: `False`)

When [VirtualScroll](#virtualscroll) is set to true, all the nodes must be of the same height, limiting the more flexible HTML rendering in the nodes available when [VirtualScroll](#virtualscroll) is off (default). Setting the property [PrefetchItems](#prefetchitems) to a value greater than 0 allows the virtual view to prefetch the specified number of items outside of the visible area to enable smoother scrolling.

## Implements

| Name                                                                              | Description                                                                                                                                                                                                                                     |
| --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata.md)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                                                                                                                                 |
| [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent.md) | Bindable components implement this interface.                                                                                                                                                                                                   |
| [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget.md)                 | Controls that support drag & drop operations implement this interface.                                                                                                                                                                          |
| [ILabel](/api/wisej.web/interfaces/wisej.web.ilabel.md)                           | Provides access to the [LabelWrapper](/api/wisej.web/editors/wisej.web.labelwrapper.md) associated with the controls that implement this interface.                                                                                             |
| [IReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly.md)                     | Provides access to the [ReadOnly](/api/wisej.web/interfaces/wisej.web.ireadonly.md#readonly) property for coontrols that support the read-only mode.                                                                                            |
| [IModified](/api/wisej.web/interfaces/wisej.web.imodified.md)                     | Provides access to the [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property and [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event for controls that implement this interface. |
| [IValidation](/api/wisej.web/interfaces/wisej.web.ivalidation.md)                 | Provides access to the validation events and properties property for controls that support validation.                                                                                                                                          |
| [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent.md)       | All wisej components implement this interface.                                                                                                                                                                                                  |
| [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol.md)           | All wisej controls derived from the [Control](/api/wisej.web/general/control.md) class must implement this interface.                                                                                                                           |
| [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable.md) | Allows an object to serialize itself.                                                                                                                                                                                                           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/lists-and-grids/wisej.web.treeviewcombobox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
