A Promise that is resolved with the result from the server or an array of objects to be converted to child nodes.

If you have a large data source hosted remotely, loading all of it may take considerable time. To quicken the process, you can load data for an individual node using the createChildren function. This function will be called at the beginning of the widget's lifetime and each time a user expands a node whose child nodes have not been loaded yet.

In the following code, the createChildren function makes a query to the server passing the parentNode object. The structure of this object is described in the Node section.

dataSource

Array of objects
A simple JavaScript array containing a collection of plain objects.

URL
A URL to JSON data or to a service returning data in JSON format.

DataSource or its configuration object
A DataSource is an object that provides a handy API for data processing. A DataSource is a stateful object, which means that it saves data processing settings and applies them each time data is loaded. All underlying data access logic of a DataSource is isolated in a Store. A Store provides an API for reading and modifying data. Unlike the DataSource, a Store is a stateless object.

NOTE

The widget requires each data item to have a key field whose value is unique within the entire array.

NOTE

If the data source is specified using the dataSource option, use the items option only for reading. Updating data items using the items option may cause unexpected results.

To display widget items, a default template can be used. This template is based on the data source fields that are listed in the Default Item Template section of the widget's API. Alternatively, you can implement a custom item template. For details, refer to the Customize Node Appearance topic.

itemHoldTimeout

items

The widget requires each data item to have a key field whose value is unique within the entire array.

You can use the dataSource option instead. Unlike the items option, the dataSource option can take on the DataSource configuration object as well as a simple array.

NOTE

If you need to modify the data source specified using the items option at runtime, do it only with the help of the items option. Updating data items using the dataSource option may cause unexpected results.

To display widget items, a default template can be used. This template is based on the data source fields that are listed in the Default Item Template section of the widget's API. Alternatively, you can implement a custom item template. For details, refer to the Customize Node Appearance topic.

itemsExpr

Specifies which data field contains nested items. Applies only if the dataStructure option is "tree".

noDataText

onContentReady

A handler for the contentReady event. Executed when the widget's content is ready. This handler may be executed multiple times during the widget's lifetime depending on the number of times its content changes.

Assign a function to perform a custom action when the right mouse button is clicked when the pointer is over a widget item, or when the "sustained" (also known as a long press) touch action is performed.

rootValue

rtlEnabled

When this option is set to true, the widget text flows from right to left, and the layout of elements is reversed. To switch the entire application/site to the right-to-left representation, assign true to the rtlEnabled field of the object passed to the DevExpress.config(config) method.

virtualModeEnabled

If the option is set to true, the widget initially loads only root items. Child items are loaded when their parent is being expanded.

NOTE

You can use the virtual mode only if the dataSource option holds the DataSource instance able to filter items by parent ID, and the dataStructure option is set to "plain". Otherwise, the virtualModeEnabled option is ignored.

Use this option to improve the widget performance when working with a huge data source.